What Custom Permissions Do in Salesforce
Custom permissions are a gatekeeping tool that lets administrators grant or deny access to specific features without giving away broad object or profile-level access. Instead of assigning a full permission set, you can create a named custom permission and then reference it in permission sets, profiles, or even within flows and Apex. This is particularly useful when you want a user to be able to run a custom button, access a Lightning page, or use a managed package feature without receiving extra object-level CRUD rights.
More from this site
Keep reading the latest coverage
Custom permissions live in Setup under Custom Permissions and act as boolean flags on a user record. When combined with permission sets, they let you compose granular access controls that profiles alone cannot express cleanly.
When to Use a Custom Permission
Use a custom permission when a user needs to see or do something that is not covered by standard object or field-level security. Common scenarios include exposing a custom tab or Lightning component, allowing access to a managed package feature, or gating a flow that performs an action you do not want all editors to run. They are also helpful for conditional visibility in Lightning App Builder, where component visibility can be tied directly to a custom permission.
How to Create and Assign a Custom Permission
To create one, navigate to Setup, enter Custom Permissions, and click New. Give the permission a clear name and description, then activate it. Next, assign the permission through a permission set or directly on a profile. In the permission set, under Custom Permissions, select the permission you created and make it enabled for the target users. If you are using permission set groups, you can bundle the custom permission with related settings and assign the group to users in a single step.
Within Lightning App Builder or Community Builder, you can set component visibility to "Custom Permission" and select the permission you created. This gives you a no-code way to show or hide UI elements based on the flag.
Best Practices for Managing Custom Permissions
- Use a consistent naming convention, such as a prefix tied to your package or project, so permissions remain identifiable in large orgs.
- Document the intent of each permission in the description field so future admins understand why it exists.
- Avoid creating a custom permission for every minor toggle; instead, group related settings logically.
- Review assignments periodically through permission set and permission set group reports.
Limitations and Things to Check
Custom permissions do not grant object or field access on their own; they must be paired with the appropriate CRUD and field-level security settings. They also cannot be used to bypass sharing rules. When troubleshooting, check that the permission is enabled on the user's permission set, that the permission set is assigned, and that any visibility rules in Lightning are pointing to the correct custom permission name.