{ "sections": [ "title", "description", "fields", "special_access_rules", "usage", "wsdl_segment", "field_reference" ], "title": "AccountShare - Data API", "description": "Represents a sharing entry on an account.", "fields_columns": [ "type", "properties", "description", "relationship_name", "relationship_type", "refers_to" ], "fields": { "AccountAccessLevel": { "type": "picklist", "properties": "Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update", "description": "Level of access that the User or Group has to the Account. The possible values are: Read Edit All (This value isn't valid for create or update calls.) This field must be set to an access level that is at least equal to the organization’s default Account access level. In addition, either this field, the OpportunityAccessLevel field, or the CaseAccessLevel field must be set higher than the organization’s default access level." }, "AccountId": { "type": "reference", "properties": "Create, Filter, Group, Sort", "description": "ID of the Account associated with this sharing entry. This field can't be updated. This is a relationship field.", "relationship_name": "Account", "relationship_type": "Lookup", "refers_to": "Account" }, "CaseAccessLevel": { "type": "picklist", "properties": "Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update", "description": "Level of access that the User or Group has to cases associated with the account. The possible values are: None Read Edit This field must be set to an access level that is at least equal to the organization’s default CaseAccessLevel. This field can't be updated via the API if the AccountAccessLevel field is set to All. You can't update this field for the associated account owner via the API. You must update the account owner’s CaseAccessLevel via the Salesforce user interface." }, "ContactAccessLevel": { "type": "picklist", "properties": "Filter, Group, Nillable, Restricted picklist, Sort", "description": "Level of access that the User or Group has to contacts associated with the account. The possible values are: None Read Edit This field must be set to an access level that is at least equal to the organization’s default ContactAccessLevel. This field can't be updated via the API if the ContactAccessLevel field is set to “Controlled by Parent.” You can't update this field for the associated account owner using the API. You must update the account owner’s ContactAccessLevel via the Salesforce user interface." }, "OpportunityAccessLevel": { "type": "picklist", "properties": "Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update", "description": "Level of access that the User or Group has to opportunities associated with the Account. The possible values are: None Read Edit This field must be set to an access level that is at least equal to the organization’s default opportunity access level. This field can’t be updated via the API if the AccountAccessLevel field is set to All. You can't use the API to update this field for the associated Account owner. You must update the Account owner’s opportunityAccessLevel via the Salesforce user interface." }, "RowCause": { "type": "picklist", "properties": "Create, Filter, Group, Nillable, Restricted picklist, Sort", "description": "Reason that this sharing entry exists. If you’re creating a sharing entry, the only permitted value is Manual. If no value is specified, the field defaults to Manual. All other RowCause values are read-only. After the sharing entry is created, this field can’t be edited. Valid values include: Manual—The User or Group has access because a User with “All” access manually shared the Account with the user or group. Owner—The User is the owner of the Account Team—The User or Group has team access (is an AccountTeamMember). Rule—The User or Group has access via an Account sharing rule. GuestRule—The user or group has access via an Account guest user sharing rule. ImplicitParent—The User or Group has access because they’re the owner of or have sharing access to records related to the account, such as opportunities, cases, contacts, contracts, or orders. GuestParentImplicit—The guest user has access because they have access to records related to the Account, such as opportunities, cases, contacts, contracts, or orders. LpuParentImplicit—The User has access because they have access to records related to the Account, which are owned by high-volume Experience Cloud site users and shared via a share group. LpuImplicit—The User has access to records owned by high-volume Experience Cloud site users via a share group. PortalImplicit—The Account is associated with the portal user. ARImplicit—The User, who belongs to a partner or customer account, has access to the Account via an account relationship data sharing rule. Territory2AssociationManual—With Sales Territories in API version 44.0 and earlier, the TerritoryManual reason code was written to AccountShare records when you manually assigned an account to a territory. In API version 45.0 and later, Territory2AssociationManual replaces all instances of TerritoryManual, and the Territory2AssociationManual reason code is written to AccountShare records when you manually assign an account to a territory. Territory—The territory has access via a territory assignment rule. TerritoryManual—Deprecated starting in API version 45.0 and replaced by the Territory2AssociationManual value." }, "UserOrGroupId": { "type": "reference", "properties": "Create, Filter, Group, Sort", "description": "ID of the User or Group that has been given access to the Account. This field can't be updated. This is a polymorphic relationship field.", "relationship_name": "UserOrGroup", "relationship_type": "Lookup", "refers_to": "Group, User" } }, "special_access_rules": "As of Summer ’20 and later, only users with access to the Account object can access this object. Customer Portal users can't access this object.", "usage": "This object allows you to determine which users and groups can view or edit Account records owned by other users. If you attempt to create an AccountShare record that matches an existing record, the request updates any modified fields and returns the existing record. For example, the following code finds all accounts owned by a user and manually shares them to a portal user. This code shares the accounts that the user owns at the time, but not those accounts that are owned later. For these types of shares, use an owner-based sharing rule, such as AccountOwnerSharingRule.\n\nThis object allows you to determine which users and groups can view or edit Account records owned by other users.\n\nIf you attempt to create an AccountShare record that matches an existing record, the request updates any modified fields and returns the existing record.\n\nFor example, the following code finds all accounts owned by a user and manually shares them to a portal user.\n\nThis code shares the accounts that the user owns at the time, but not those accounts that are owned later. For these types of shares, use an owner-based sharing rule, such as AccountOwnerSharingRule.", "wsdl_segment": "```xml\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n```", "field_reference": { "AccountAccessLevel": { "field_label": "Account Access", "type": "picklist", "length": "40" }, "AccountId": { "field_label": "Account ID", "type": "reference", "length": "18" }, "CaseAccessLevel": { "field_label": "Case Access", "type": "picklist", "length": "40" }, "ContactAccessLevel": { "field_label": "Contact Access", "type": "picklist", "length": "40" }, "Id": { "field_label": "Account Share ID", "type": "id", "length": "18" }, "IsDeleted": { "field_label": "Deleted", "type": "boolean" }, "LastModifiedById": { "field_label": "Last Modified By ID", "type": "reference", "length": "18" }, "LastModifiedDate": { "field_label": "Last Modified Date", "type": "datetime" }, "OpportunityAccessLevel": { "field_label": "Opportunity Access", "type": "picklist", "length": "40" }, "RowCause": { "field_label": "Row Cause", "type": "picklist", "length": "40" }, "UserOrGroupId": { "field_label": "User/Group ID", "type": "reference", "length": "18" } }, "field_reference_columns": [ "field_label", "type", "length" ] }