Salesforce Fact #654 | Custom permission assignments

Suppose we have a scenario where we need to find out a particular custom permission is assigned to which all permission sets. There is an object called SetupEntityAccess which is helpful in this case to get the details.

In this example, we are getting the details for a custom permission named 'Test_Custom_Permission'.

SOQL used -> SELECT Id, Parent.name, SetupEntityId, SetupEntityType, SystemModstamp FROM SetupEntityAccess WHERE parent.isownedbyprofile=False AND SetupEntityId IN (SELECT Id FROM CustomPermission WHERE DeveloperName='Test_Custom_Permission')

Attached is the screenshot.



Comments

  1. Thanks for sharing your blog very informative. If you want to motivational career, technology, health, and Bollywood latest factscheck then visit blogimine.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

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