Tuesday, April 12, 2016

[Salesforce] The Sobject Crusade: AccountShare

Back to the Sobject Crusade list.

Source: AccountShare

This object allow a User that has access to the record to share the Account object directly to a User or a Group.

To create such object you have to change the Account Sharing Settings to at least "Public Read Only" by clicking on Setp > Security Controls > Sharing Settings:


Now the Sharin button will compare on the Account page layout if you don't see it, add it with the layout editor):


This page shows all the users, groups, roles and territories that have access to the record.

Let's manually add a new manual share:


And this is the result (added a group and a user):


The Expand List shows the details of the users to whom the Account is shared:


The SOQL to query the objects:

Select Id, Account.Name, RowCause, UserOrGroup.Id, UserOrGroup.Name, UserOrGroup.Type, AccountAccessLevel from accountshare where accountid='00124000005FoHP'

No comments:

Post a Comment