Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
AccountOwnerSharingRule
Supported Calls
create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()
Fields
Usage
Use this object to manage the sharing rules for accounts. General sharing and territory management-related sharing use this object. For example, the following code creates an account owner sharing rule between two public groups, which can also contain portal users.
1AccountOwnerSharingRule rule = new AccountOwnerSharingRule();
2rule.setName("RuleName"); // Set the sharing rule name
3rule.setDeveloperName("RuleDeveloperName"); // Set the sharing rule developer name
4rule.setGroupId("00Gx00000000000"); // Set the group of users to share records from
5rule.setUserOrGroupId("00Gx00000000001"); // Set the group of users to share records to
6rule.setAccountAccessLevel("Edit");
7rule.setOpportunityAccessLevel("Read");
8rule.setCaseAccessLevel("None");
9connection.create(rule);