Newer Version Available
AccountRelationshipShareRule
File Suffix and Directory Location
AccountRelationshipShareRule components have the suffix .accountRelationshipShareRule and are stored in the .accountRelationshipShareRules folder.
Version
AccountRelationshipShareRule components are available in API version 45.0 and later.
Special Access Rules
Access to the AccountRelationshipShareRule type requires orgs to enable the Account Relationships permission. The Manage Experiences permission is required for user access.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| accessLevel | string | Type of access granted by the share rule. Valid values are:
|
| accountToCriteriaField | string | Criteria that must be met for the data to be shared. Valid values are:
To get the full list for your org, do a Describe on the ARSR entity. |
| description | string | A meaningful explanation of the sharing rule. |
| entityType | string | The type of data being shared by this share rule. Valid values are:
|
| masterLabel | string | The label assigned to the sharing rule to identify it. |
| staticFormulaCriteria | string | A way to further filter what data gets shared. This string must be a deterministic formula, and spanning isn’t allowed. |
| type | string | Must match the type of an account relationship for data to be shared according to the accountToCriteriaField and the staticFormulaCriteria fields. |
Declarative Metadata Sample Definition
The following is an example of an AccountRelationshipShareRule component.
1<?xml version="1.0" encoding="UTF-8"?>
2<AccountRelationshipShareRule xmlns="http://soap.sforce.com/2006/04/metadata">
3 <accessLevel>Edit</accessLevel>
4 <accountToCriteriaField>Account.OwnerId</accountToCriteriaField>
5 <description>TestDescription</description>
6 <entityType>Account</entityType>
7 <masterLabel>TestName</masterLabel>
8 <staticFormulaCriteria>YearStarted = "1980"</staticFormulaCriteria>
9 <type>Dealer</type>
10</AccountRelationshipShareRule>The following is an example package.xml that references the previous definition.
1<Package>
2<?xml version="1.0" encoding="UTF-8"?>
3<Package xmlns="http://soap.sforce.com/2006/04/metadata">
4 <types>
5 <members>ArsrDevName</members>
6 <name>AccountRelationshipShareRule</name>
7 </types>
8<version>45.0</version>
9</Package>This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file.