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
davidesidavidesi 

How to know who has access to a record

Hi,
I need to know which users has access to an opportunity or an account.

I know that using  the table UserRecordAccess I can know if a specified user has access to a specified record, but I would need to konw all the users who has access to a record.
Is that possible?

Thank you very much
Shrikant BagalShrikant Bagal
In Visualforce:
{!$ObjectType.Account.accessible}

In Apex (see Understanding Apex Describe Information):

Schema.DescribeSObjectResult accountDescribe = Account.sObjectType.getDescribe();
System.debug('accessible:' + accountDescribe.accessible);

If its helps, please mark as best answer so it will help to other who will serve same problem.
​Thanks! 
davidesidavidesi
Thank you for your answer Shrikant , but what I need to know is the list of users who has access to a specified record, not to an object.
Arunkumar RArunkumar R
Hi Davidesi,

You can check it by referring UserRecordAccess object. Already similar thread available in stackexchange. Please take a look,

http://salesforce.stackexchange.com/questions/175/can-i-find-out-if-the-current-user-has-access-to-a-record-without-querying