Newer Version Available
SharingSettings
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.
File Suffix and Directory Location
SharingSettings values are stored in the Sharing.settings file in the settings directory. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
SharingSettings is available in API version 47.0 and later.
Special Access Rules
To use SharingSettings, you need the Manage Sharing permission.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| deferGroupMembership | boolean | Indicates whether group membership calculations are suspended (true) or not (false). This field has a default value of false. This field is available in API version 49.0 and later. |
| deferSharingRules | boolean | Indicates whether sharing rule calculations are suspended (true) or not (false). This field has a default value of false. This field is available in API version 49.0 and later. |
| enableAccountRoleOptimization | boolean | Indicates whether person roles are assigned to new community users in accounts without existing users (true) or if portal roles are created for new users (false). This field has a default value of false. |
| enableAssetSharing | boolean | Indicates whether sharing is enabled for assets (true) or asset access is determined by the parent object’s sharing rules (false). This field has a default value of false. |
| enableCommunityUserVisibility | boolean | Indicates whether community users in the same community can see each other regardless of the organization-wide defaults (true) or not (false). This field has a default value of false. In orgs created in API version 47.0 and later, this setting doesn’t apply to guest users. |
| enableExternalSharingModel | boolean | Indicates whether the external sharing model is enabled (true) or not (false). This field has a default value of true if communities are enabled, and a default value of false if not. To use this field, you need the Customize Application permission. |
| enableManagerGroups | boolean | Indicates whether users can share records with their managers and manager subordinates groups (true) or not (false). This field has a default value of false. To use this field, you need the View and Manage Users permission. |
| enableManualUserRecordSharing | boolean | Indicates whether users can share their own user record (true) or not (false). This field has a default value of false. |
| enablePartnerSuperUserAccess | boolean | Indicates whether you can grant super user access to partners in communities (true) or not (false). This field has a default value of false. To use this field, you need the Customize Application permission |
| enablePortalUserCaseSharing | boolean | Indicates whether portal users can access related contacts for cases that they own (true) or not (false). This field has a default value of false. |
| enablePortalUserVisibility | boolean | Indicates whether portal users in the same customer or partner portal account can see each other regardless of the organization-wide defaults (true) or not (false). This field has a default value of false. To enable this field, contact Salesforce Support. |
| enableRemoveTMGroupMembership | boolean | Removes group membership info for the original territory management feature after migrating to Enterprise Territory Management when set to true. This field has a default value of false. Once this field is set to true, it can't be set to false again. |
| enableRestrictAccessLookupRecords | boolean | Indicates whether users must have read access to a record to see the record’s name in lookup and system fields (true) or not (false). This field has a default value of true in Salesforce orgs created in Spring ’20 or later and a default value of false in all other orgs. This field is available in API version 48.0 and later. |
| enableSecureGuestAccess | boolean | Indicates whether guest users’ record access is secured (true) or not (false). If set to true, guest users have org-wide defaults set to Private, and you must use guest user sharing rules to share records with them. This field has a default value of false. |
| enableStandardReportVisibility | boolean | Indicates whether users can view reports based on standard report types that may expose data of users to whom they don't have access (true) or not (false). This field has a default value of false. |
| enableTerritoryForecastManager | boolean | Indicates whether forecast managers can act as delegated administrators for territories below them in the hierarchy (true) or not (false). This field has a default value of false. |
Declarative Metadata Sample Definition
The following is an example of a SharingSettings component.
The following is an example package.xml that references the previous definition.
Wildcard Support in the Manifest File
The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.