How to Query Object Permissions for a Profile in Salesforce?

Sample SOQL:

SELECT sObjectType, PermissionsCreate, PermissionsRead, PermissionsEdit, PermissionsDelete, PermissionsModifyAllRecords, 
   PermissionsViewAllRecords FROM ObjectPermissions 
 WHERE ParentId IN ( SELECT Id 
   FROM permissionset 
  WHERE PermissionSet.Profile.Name = 'System Administrator' )


No comments:

Post a Comment