12.07.2015 Views

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Metadata</strong> TypesSharingRulesDeclarative <strong>Metadata</strong> File Suffix and Directory LocationSharingRules are stored in their corresponding entity directory and the file name matches the entity name. SharingRules forcustom objects are stored in the customObjectSharingRules directory, which contains files with the .sharingRulesextension such as ObjA__c.sharingRules, where ObjA refers to the developer name of a custom object type.VersionSharingRules <strong>com</strong>ponents are available in <strong>API</strong> version 24.0 and later.FieldsThe following information assumes that you are familiar with implementing sharing rules for custom objects. For moreinformation on these fields, see “Overview of Sharing Settings” in the <strong>Database</strong>.<strong>com</strong> online help.FieldfullNameField TypestringDescriptionThe unique identifier for <strong>API</strong> access. ThefullName can contain only underscores andalphanumeric characters. It must be unique,begin with a letter, not include spaces, notend with an underscore, and not contain twoconsecutive underscores. This field isinherited from the <strong>Metadata</strong> <strong>com</strong>ponent.CustomObjectSharingRulesRepresents the sharing rules for custom objects. It extends the SharingRules metadata type and inherits its fullName field.FieldcriteriaBasedRulesownerRulesField TypeCustomObjectCriteriaBasedSharingRule[]CustomObjectOwnerSharingRule[]DescriptionList that defines user criteria-based rules.List that defines user membership-based rules.UserSharingRulesRepresents the sharing rules for users. With user sharing rules, you can share members of a group with members of anothergroup. It extends the SharingRules metadata type and inherits its fullName field.FieldcriteriaBasedRulesmembershipRulesField TypeUserCriteriaBasedSharingRule[]UserMembershipSharingRule[]DescriptionList that defines user criteria-based rules.List that defines user membership-based rules.Declarative <strong>Metadata</strong> Sample DefinitionThe following is the definition of a user criteria-based sharing rule and a user membership-based sharing rule. The file namecorresponds to User.sharingRules under the userSharingRules directory.shareUsers2Asia_DivisionFirstName164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!