Print this page

Hide a custom list view button from profiles

Knowledge Article Number 000002488
Description Hiding custom list view button for some profiles can be achieved by Developing VisualForce page or by adding an Apex code in the "onclick" of the button. Both of these options will require some development.
Resolution

Workarounds to hide custom list view button from profiles

1. Develop a VisualForce page to replicate the list view page and the button and add apex code to display / hide the command button based on the running profile. This solution since requires re-querying all the list views.

2. Add an apex code in the "onclick" of the button which will either allow button functionality or display error message based on the profile clicking it. In this case the button will always be shown to all profiles but could only be used by authorized profiles.

If this is a feature that you'd like to see implemented, make sure you go vote for the Idea





promote demote