No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
OwnerSharingRule
Represents an ownership-based sharing rule. OwnerSharingRule enables you to share records owned by a set of users with another set, using rules that specify the access level of the target user group. It extends the BaseSharingRule metadata type and inherits its SharedTo field. For more information, see “Sharing Rules Overview” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
OwnerSharingRules components are stored within the SharingRules component in the ownerRules field.
Version
OwnerSharingRules components are available in API version 24.0 and later.
Fields
The following information assumes that you are familiar with implementing sharing rules for standard objects and custom objects. For more information on these fields, see “Overview of Sharing Settings” in the Salesforce online help.
| Field | Field Type | Description |
|---|---|---|
| sharedFrom | SharedTo | Required. Specifies the record owners. |
| sharedTo | SharedTo | Required. Specifies who the record should be shared with. |
| fullName | string | The unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the Metadata component. |
AccountOwnerSharingRule
Represents a sharing rule for an account with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
AccountOwnerSharingRule is used by the ownerRules field in AccountSharingRules.
| Field | Field Type | Description |
|---|---|---|
| accountAccessLevel | ShareAccessLevelNoNone (enumeration of type string) | Required. A value that represents the level of access that
a group or role has to the account. The possible values are:
|
| caseAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a group or role has to cases associated with the account. The possible
values are:
|
| contactAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a group or role has to contacts associated with the account. The possible
values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
| opportunityAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for any associated opportunity. The possible
values are:
|
CampaignOwnerSharingRule
Represents a sharing rule for a campaign with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
CampaignOwnerSharingRule is used by the ownerRules field in CampaignSharingRules.
| Field | Field Type | Description |
|---|---|---|
| campaignAccessLevel | ShareAccessLevelNoNone (enumeration of type string) | A value that represents the level of access that a group or
role is granted for a campaign. The possible values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Name for the sharing rule. Corresponds to Label in the user interface. |
CaseOwnerSharingRule
Represents a sharing rule for a case with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
CaseOwnerSharingRule is used by the ownerRules field in CaseSharingRules. All the following fields are required.
| Field | Field Type | Description |
|---|---|---|
| caseAccessLevel | ShareAccessLevelReadEdit (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for a case. The possible values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
ContactOwnerSharingRule
Represents a sharing rule for a contact with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
ContactOwnerSharingRule is used by the ownerRules field in ContactSharingRules.
| Field | Field Type | Description |
|---|---|---|
| contactAccessLevel | ShareAccessLevelReadEdit (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for a contact. The possible values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
LeadOwnerSharingRule
Represents a sharing rule for a lead with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
LeadOwnerSharingRule is used by the ownerRules field in LeadSharingRules.
| Field | Field Type | Description |
|---|---|---|
| leadAccessLevel | ShareAccessLevelReadEdit (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for a lead. The possible values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Required. Name for the sharing rule. Corresponds to Label in the user interface. |
OpportunityOwnerSharingRule
Represents a sharing rule for an opportunity with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
OpportunityOwnerSharingRule is used by the ownerRules field in OpportunitySharingRules.
| Field | Field Type | Description |
|---|---|---|
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| opportunityAccessLevel | ShareAccessLevelReadEdit (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for an opportunity. The possible values
are:
|
AccountTerritorySharingRule
Represents a rule for sharing an account within a territory. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
AccountTerritorySharingRule is used by the ownerRules field in AccountTerritorySharingRules.
| Field | Field Type | Description |
|---|---|---|
| accountAccessLevel | ShareAccessLevelNoNone (enumeration of type string) | Required. A value that represents the level of access that
a Territory or TerritoryAndSubordinates group is granted for an account
territory. The possible values are:
|
| caseAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a Territory or TerritoryAndSubordinates group is granted for all child
cases to an account. The possible values are:
|
| contactAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a Territory or TerritoryAndSubordinates group is granted for all
related contacts on an account. The possible values are:
|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
| opportunityAccessLevel | ShareAccessLevelNoAll (enumeration of type string) | Required. A value that represents the level of access that
a Territory or TerritoryAndSubordinates group is granted for all
opportunities associated with an account. The possible values are:
|
CustomObjectOwnerSharingRule
Represents a sharing rule for custom objects. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
CustomObjectOwnerSharingRule is used by the ownerRules field in CustomObjectSharingRules.
UserMembershipSharingRule
Represents a sharing rule to share members of a group with another group of users. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.
UserMembershipSharingRule is used by the ownerRules field in UserSharingRules.
| Field | Field Type | Description |
|---|---|---|
| description | string | Represents the description of the sharing rule. Maximum of
1000 characters. This field is available in API version 29.0 and later. |
| name | string | Required. Name for the sharing rule. Corresponds to Label in the user interface. |
| userAccessLevel | ShareAccessLevelReadEdit (enumeration of type string) | Required. A value that represents the level of access that
a group or role is granted for a user. The possible values are:
|