Posts

Showing posts with the label Profiles

Salesforce: Who Has Permission? (And what Profiles/Permission SetsGrant It?)

“Can you run me a report to see who has edit permissions on Cases?” It’s the kind of thing that makes you cringe since it’s such a simple question and not remotely easy to achieve since the config screens are a disaster and it could be in any number of Profiles or Permission Sets. Here’s how to find out. The following query will give you a quick list. (H/T Adam Torman ) [code lang=”sql”] SELECT Assignee.Name FROM PermissionSetAssignment WHERE PermissionSetId IN (SELECT ParentId FROM ObjectPermissions WHERE SObjectType = ‘My_Object__c’ AND (PermissionsCreate = true OR PermissionsEdit = true)) and Assignee.isActive = true [/code] You can run this in the Developer Console under “Query Editor” tab. Note that you have to change “My_Object__c” to your object name, and this filters by active users and Create or Edit permissions. You can run this using Workbench , dump it to Excel and deduplicate it. Problem solved. Great. So What Profiles/Permission Sets Grant Access? So the next ques...