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
MadboyMadboy 

Query Profile and Object Report

Hi, I'm new to Salesforce admin. Is it possible that i can perform a query using SOQL to retrive a list of profiles and corresponding access to each standard and custom object? I want to create an access matrix for our org.

Rise AnalyticsRise Analytics

NoahBoy,

 

I don't think you can do this in 1 query, but here's what you can do in 2 queries:

 

1. This query gives you the Profile Id and object permissions assigned to that profile.

 

SELECT Parent.ProfileId, sObjectType, PermissionsCreate, PermissionsRead, PermissionsEdit, PermissionsDelete, PermissionsViewAllRecords, PermissionsModifyAllRecords FROM ObjectPermissions

 

2. This is just a simple lookup of the Profile Id from query 1 to the actual name of that profile.

 

SELECT Id, Name FROM Profile