Salesforce Fact #528 | Find out permission set assignments

Do you know there is an Sobject in Salesforce called 'PermissionSetGroupComponent' which keeps track of the permission set assignments in permission set groups.

Suppose, we need to find out a particular permission set is assigned to which permission set groups. To get this, we can query on this object. For example, we can use the below query to find out the permission set 'Edit_Read_Only_Fields_Permission' is assigned to which permission set groups:

SELECT Id, PermissionSetGroupId, PermissionSetGroup.MasterLabel FROM PermissionSetGroupComponent WHERE Permissionset.Name='Edit_Read_Only_Fields_Permission'

For more details, check out: https://developer.salesforce.com/docs/atlas.en-us.234.0.object_reference.meta/object_reference/sforce_api_objects_permissionsetgroupcomponent.htm

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow