Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
SetupEntityAccess
To grant users access to an entity, associate the appropriate SetupEntityAccess record with a PermissionSet that’s assigned to a user.
Supported Calls
create(), delete(), describeSObjects(), query(), retrieve()
Special Access Rules
As of Spring ’20 and later, only users with "View Setup and Configuration" permission can access this object.
Fields
Usage
Because SetupEntityAccess is a child of the PermissionSet object, the usage is similar to other PermissionSet child objects like FieldPermissions and ObjectPermissions.
1SELECT Id, ParentId, Parent.Name, SetupEntityId
2FROM SetupEntityAccess1SELECT Id, ParentId, Parent.Name, SetupEntityId
2FROM SetupEntityAccess
3WHERE SetupEntityType='ApexClass'1SELECT Id, ParentId, Parent.Name, SetupEntityId
2FROM SetupEntityAccess
3WHERE ParentId
4IN (SELECT Id
5 FROM PermissionSet
6 WHERE isOwnedByProfile = false)1SELECT Id, Name,
2 (SELECT Id, Parent.Name, Parent.Profile.Name
3 FROM SetupEntityAccessItems)
4FROM ApexClass
5WHERE Name = 'helloWorld'1SELECT Id, Name, Label
2FROM AppMenuItem
3WHERE Name = 'Recruiting'1SELECT Id, SetupEntityId, SetupEntityType
2FROM SetupEntityAccess
3WHERE ParentId
4IN
5 (SELECT PermissionSetId
6 FROM PermissionSetAssignment
7 WHERE AssigneeId = '005D0000001QOzF')
8AND (SetupEntityId = '02uD0000000GIiMIAW')