You need to sign in to do that
Don't have an account?
Banwari kevat1
SOQL to find all Custom Permission name for a given profile.
Hi guys,
As we know we can easily find out all custom permissions for a user using SetupEntityAccess SAOP API.
But for a instance also as we can assign custom permissions to a profile from UI(profile daetail page). i want to access all custom permissions assigned to a profile.
Can anyone help me how to do.
Thanks,
Banwari
As we know we can easily find out all custom permissions for a user using SetupEntityAccess SAOP API.
But for a instance also as we can assign custom permissions to a profile from UI(profile daetail page). i want to access all custom permissions assigned to a profile.
Can anyone help me how to do.
Thanks,
Banwari
Please refer the below link for reference.
- https://salesforce.stackexchange.com/questions/138561/soql-to-find-all-users-with-a-custom-permission
ThanksRahul
Thanks for reply. But your reply is not the answer what i was asking. Please read question carefully. What answer you have given,I already mentioned in my question. I want to get all custom permissions assigned to profile not to user. You answered for User.
Thanks
Banwari
SELECT DeveloperName, MasterLabel FROM CustomPermission
SELECT ParentId FROM SetupEntityAccess WHERE SetupEntityId IN (SELECT Id FROM CustomPermission WHERE DeveloperName = 'NAME')
SELECT Id, Label, ProfileId, Profile.Name, LicenseId, Name, IsCustom FROM PermissionSet WHERE ID = 'ParentId FROM above query'
Here you will get list of profile which has custom permission assigned. I hope you know how to write code now using above query.