function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FredrickUNFredrickUN 

AccountShare - Unable to retrieve the expanded user list via SOQL

Hi,

When using the UI I have the option to see all users that have access to an account. This will include users that are the manager of the account record. This is the URL https://cs8.salesforce.com/setup/own/entitywhylist.jsp?id=001L000000iNyzm&uid=005D0000003cn9W

I'm trying to run a SOQL statement that will return the same expanded list without success. Here's the query Select id,UserOrGroupId,rowcause from AccountShare where Accountid = '001L000000iNyzm' and UserOrGroupID = '005D0000003cn9W'

Does anybody know which object I should be querying to treturn the expanded list of users that can access ther account?

cheers

 
ShashankShashank (Salesforce Developers) 
Accountshare is the correct object for this. Is there any specific information you are missing between the SOQL and the UI?