Activity Forums Salesforce® Discussions How can we find if a particular user has edit permission on a specific Sobject in salesforce?

  • How can we find if a particular user has edit permission on a specific Sobject in salesforce?

  • sushant

    Member
    February 20, 2017 at 1:39 pm

    Hi All,

    How can we find if a particular user has edit permission on a specific Sobject in salesforce?

    Thanks

  • Kumar

    Member
    February 22, 2017 at 10:04 am

    Hi Sushant,

    If you have a particular user id, you can query on the PermissionSetAssignment object to get the id of all users who have a specific level of access on that Sobject.

    For example, this query gives you all the users who have 'view all' and 'modify all' permissions on Account.

    SELECT Assignee.Id, Assignee.Name FROM PermissionSetAssignment WHERE PermissionSetId IN (SELECT ParentId FROM ObjectPermissions WHERE SObjectType = 'Account' AND PermissionsViewAllRecords = true AND PermissionsModifyAllRecords = true)

    • This reply was modified 4 years, 11 months ago by  Kumar.
Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos