Custom Permissions
Published in
Jan 7, 2022
Used to give access to Users those which cannot be handled by Profile & Permission Set
Example : Bypass validation rule. Validation rule should be applicable only for certain users.
Process :
1. Create Custom Permission (Search in Setup)
This Permission needs to be added in Permission Set or Profile. Most preferable Permission Set.
2. Add Custom Permission in a Permission Set
3. Assign users to that Permission Set.
4. Use in Validation Rule / Apex as per requirement.
Get to know if logged in user has that Custom Permission assigned :
1. In Validation Rule :
$Permission.Custom_API_Name;
2. In Apex :
Boolean hasCustomPermission = FeatureManagement.checkPermission(‘Custom_API_Name’);