Activity Forums Salesforce® Discussions How to check whether user has access to a particular record or not?

  • Manpreet

    Member
    April 27, 2018 at 11:21 am

    Hi saurabh,

    Query “userRecordAccess” to check whether has access to record or not.
    For example:
    SELECT RecordId, HasReadAccess, HasTransferAccess, MaxAccessLevel, HasAllAccess, HasDeleteAccess, HasEditAccess FROM UserRecordAccessWHERE UserId = “005xxxxxxxxx”AND RecordId = “001xxxxxxxx”
    HasAllAccess Indicates whether a user has all access–read, edit, delete, and transfer—to the record (true) or not (false).
    HasReadAccess, HasEditAccess , HasDeleteAccess ,HasTransferAccess return Boolean value.
    MaxAccessLevel return access level like None, read, Edit,Delete,Transfer and All.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos