{ "sections": [ "title", "description", "directory_location", "fields", "sub_types", "declarative_metadata_sample_definition" ], "title": "CriteriaBasedSharingRule - Metadata API", "description": "This component is removed as of API version 33.0 and is available in earlier versions only. Use SharingRules instead. Represents a criteria-based sharing rule. CriteriaBasedSharingRule enables you to share records based on specific criteria.", "directory_location": "SharingRules", "fields_columns": [ "type", "description" ], "fields": { "criteriaItems": { "type": "FilterItem[]", "description": "List that represents the criteria for the sharing rule. The possible values are: field operation value" } }, "sub_types": { "AccountCriteriaBasedSharingRule": { "accountAccessLevel": { "type": "ShareAccessLevelNoNone (enumeration of type string)", "description": "A value that represents the level of access that the user or group has to the account. The possible values are: Read Edit All", "required": true }, "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "caseAccessLevel": { "type": "ShareAccessLevelNoAll (enumeration of type string)", "description": "A value that represents the level of access that the user or group has to cases associated with the account. The possible values are: None Read Edit", "required": true }, "contactAccessLevel": { "type": "ShareAccessLevelNoAll (enumeration of type string)", "description": "A value that represents the level of access that the user or group has to contacts associated with the account. The possible values are: None Read Edit", "required": true }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true }, "opportunityAccessLevel": { "type": "ShareAccessLevelNoAll (enumeration of type string)", "description": "A value that represents the level of access that a target group is granted for any associated opportunity. The possible values are: None Read Edit", "required": true } }, "CampaignCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "campaignAccessLevel": { "type": "ShareAccessLevelNoNone (enumeration of type string)", "description": "A value that represents the level of access that a target group is granted for a campaign. The possible values are: Read Edit All", "required": true }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "CaseCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "caseAccessLevel": { "type": "ShareAccessLevelReadEdit (enumeration of type string)", "description": "A value that represents the level of access being granted for a case. The possible values are: Read Edit", "required": true }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "ContactCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "contactAccessLevel": { "type": "ShareAccessLevelReadEdit (enumeration of type string)", "description": "A value that represents the level of access being granted to the target group, role, or user for a contact. The possible values are: Read Edit", "required": true }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "LeadCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "leadAccessLevel": { "type": "ShareAccessLevelReadEdit (enumeration of type string)", "description": "A value that represents the level of allowed access. The possible values are: Read Edit", "required": true }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "OpportunityCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "opportunityAccessLevel": { "type": "ShareAccessLevelReadEdit (enumeration of type string)", "description": "A value that represents the level of allowed access. The possible values are: Read Edit", "required": true }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "CustomObjectCriteriaBasedSharingRule": { "accessLevel": { "type": "string", "description": "A value that represents the type of allowed sharing. The possible values are: Read Edit All", "required": true }, "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true } }, "UserCriteriaBasedSharingRule": { "booleanFilter": { "type": "string", "description": "Represents the filter logic of the sharing rule." }, "description": { "type": "string", "description": "Represents the description of the sharing rule. Maximum of 1000 characters. This field is available in API version 29.0 and later." }, "name": { "type": "string", "description": "Name for the sharing rule. Corresponds to Label in the user interface.", "required": true }, "userAccessLevel": { "type": "ShareAccessLevelReadEdit (enumeration of type string)", "description": "A value that represents the type of allowed sharing. The possible values are: Read Edit", "required": true } } }, "declarative_metadata_sample_definition": [ { "description": "The following is the definition of two owner-based sharing rules and one criteria-based sharing rule containing two criteria items. The file name corresponds to the Account.sharingRules file under the accountSharingRules directory.", "code": "\n\n \n G1Dev_G2New\n \n G2New\n \n \n G1Dev\n \n Read\n None\n Read\n \n G2New_R1New\n \n R1New\n \n \n G2New\n \n Edit\n Read\n Edit\n G2New_R1New\n None\n \n \n AccountCriteria\n \n G1\n \n \n BillingCity\n equals\n San Francisco\n \n \n MyChkBox__c\n notEqual\n False\n \n Read\n 1 OR 2\n None\n Read\n AccountCriteria\n None\n \n" } ] }