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

  • 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 7 years, 2 months ago by  Kumar.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos