AcountShare
ContactShare
OpportunityShare
.......
For Custom Objects:
MyCustomObject__Share
Properties:
AccessLevel
ParentID
RowCause
UserOrGroupdId
Examples:
MyCustomObject__Share myObj = new MyCustomObject__Share();
myObj.AccessLevel = 'Read';
myObj.ParentID = someId;
myObj.RowCause = Schema.MyCustomObject__Share.Manual;
myObj.UserOrGroupId = someUserOrGroupId;
For more information: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm
No comments:
Post a Comment