How to Query Field Permissions for a Profile in Salesforce?

How to Query Field Permissions for a Profile in Salesforce?

Use FieldPermissions Entity to Query Field Permissions for a Profile in Salesforce.

Sample SOQL:

SELECT sObjectType, Field, PermissionsRead, PermissionsEdit 
FROM FieldPermissions 
WHERE ParentId IN ( 
SELECT Id 
FROM PermissionSet 
WHERE PermissionSet.Profile.Name = 'System Administrator'
) 
ORDER BY sObjectType

Output:

Leave a Reply