Why Isn’t My Custom Permissions Working?
Loyal readers on my blog will now that I LOVE Custom Permissions in Salesforce. I’ve written blogs about using them with Lightning Component Visibility, Validation & Workflow Rules, and with Process Builder. I have also used Custom Permissions to control which users can use a Flow and control the Flow functionality (future post!).
Custom Permissions give us the flexibility to make dynamic and fluid changes to our Salesforce orgs without having to update anything beyond the assignment of the Custom Permission. I personally love just having to add or remove a custom permission instead of having to edit the validation/workflow rule, process, or visibility controls. It’s simply very admin-friendly and fairly scalable.
I found a recent issue with using Custom Permissions. Sometimes, they simply do not work. The most recent issue is with Lightning Component visibility. For some odd reason, for the visibility to work with Lightning Component visibility, you need to give your users the “View Setup and Configuration” permission. It needs to be assigned either to their profile or permission set.
Without this permission, the visibility criteria effectively resolve as “false.” Obviously, this is less than ideal. By assigning the permission, viola, your visibility filter will work.
Personally, I think this issue is crazy. You can use profile name and id for Lightning Component visibility without users having “View Setup and Configuration” permission. The same should apply to custom permissions.
So if you’re using Custom Permissions and they’re just not working or you’re getting an error – try giving the user the “View Setup and Configuration” permission and see if that fixes it. Then, vote and comment the idea to fix this.
Don’t miss a post! Sign up to receive email notications.
I run this site, the podcast, and my training videos for the community. I do incur some costs. I greatly appreciate if you can help me out by checking out my affiliates and – if you shop amazon – start your search on my site.