Posts

Showing posts with the label CustomPermission

Salesforce Fact #773 | Hide contact phone and email in screen flow datatable

Image
Suppose there is a scenario where we need to show the contact email and phone in screen flow datatable only if a particular custom permission is assigned to the user. Otherwise, it would be hidden to the user. We can implement the same using a bit of formula logic. Attached are the screenshots.

Salesforce Fact #654 | Custom permission assignments

Image
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.

Salesforce Fact #550 | CustomPermissionDependency

Image
Do you know there is an object in Salesforce named 'CustomPermissionDependency' which tracks the dependency among custom permissions. Using this object, we can track which custom permission is a required one while assigning another custom permission. In this example, we have two custom permission: 'Convert Leads' and 'Test Custom Permission'. We want to setup the dependency such that Test custom Permission is a required custom permission while assigning 'Convert Leads' custom permission. Reference:  https://developer.salesforce.com/docs/atlas.en-us.238.0.object_reference.meta/object_reference/sforce_api_objects_custompermissiondependency.htm Attached are the screenshots.