September 4, 2018

How 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


No comments:

Post a Comment