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
amitverma1195@gmail.comamitverma1195@gmail.com 

How can I find a user's access level on a record in batch class?

I want to know the user's access on level of records in batch class. I am passing user id in batch class query.
Jim JamJim Jam
You need to query the object's 'share' object. eg. If object is Account, query AccountShare. Refer to the following for more information:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_bulk_sharing_creating_with_apex.htm