My Favorite Winter 19 Feature – Lightning & Custom Permissions


I really like that component visibility has been added to Lightning components, but it has its drawbacks, or rather, had its drawbacks. How many times have you tried to make a component for just managers or a subset of users and your filters end up looking like this?

The limit to the amount of filters you can have is 10.  If you have more than that, the next best option is to create multiple components with different visibility, which would be unmanageable.  The better way at this point would be to make a custom field on the user record, which can begin to get unwieldy if you have many fields already.

Enter… custom permissions!

Custom permissions are great for validation rules and to allow certain users to bypass processes, great for formulas and great for workflow rules.  Now they are great for controlling UI elements too!

For your manager profile or permission set, you can add the custom permission.  Let’s call it “Manager view.”  Click on the profile and the “custom permission” section.  Add the custom permission.

Now, on your lightning home page, change the Filter to have “Manager View” as the permission.

 

Then you end up with this.

That’s it!  Custom permissions are a great new add to make component visibility more extensible and administrator friendly.  I hope that you enjoy them as much as I do come Winter ’19!

Leave a comment

Your email address will not be published. Required fields are marked *