I often need to find out which profiles have editable access to specific fields. I do it manually by checking profile > object settings > object > fields. Is there a better way to do this.
1 Answer
You could use the FieldPermissions Object query like below as an example
SELECT Id, Field, ParentId, Parent.Name, Parent.Profile.Name,
Parent.ProfileId, PermissionsRead, PermissionsEdit FROM FieldPermissions
Where Field = 'Account.Website' AND (PermissionsEdit = true OR
PermissionsRead = true)
Use the field/filter on Parent.IsCustom
to determine
If true, the permission set is custom (created by an admin); if false, the permission set is standard and related to a specific permsision set license
Represents the enabled field permissions for the parent PermissionSet. This object is available in API version 24.0 and later.