function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VarunCVarunC 

Hide List Button for some Profiles

Hi,

 

I am looking for a way to Display and Hide a Button placed on LIST  View of records, like All Contacts list view where I place a button to Update selected records, but I Do NOT Want ALL users to SEE that button, I only want Users of Certain Profile which can see the Button and then click it to Update Records.

 

How can I achieve this ?

Best Answer chosen by Admin (Salesforce Developers) 
Ron HessRon Hess

If you remove the ability of the profile to create a new contact, that button should be removed.  This can be done by editing the profile.  Not sure about the mass update, i think that may also be a profile setting.

 

This is a feature of the declarative application configuration , not controlled by Visualforce.  

All Answers

Ron HessRon Hess

Visualforce would not allow you to modify a list view directly. 

 

You can create a custom field, formula field, on the object itself.  This formula would show a link if the profile matched the one you wanted, and show something else otherwise.

VarunCVarunC

please check the following screen ...

  

 

 

I need to show and hide the above mentioned buttons in ENHANCED LIST based on user's Profile .. How can I do this ... ?

Ron HessRon Hess

If you remove the ability of the profile to create a new contact, that button should be removed.  This can be done by editing the profile.  Not sure about the mass update, i think that may also be a profile setting.

 

This is a feature of the declarative application configuration , not controlled by Visualforce.  

This was selected as the best answer
AQAQ
Could the mass update button be eliminated by removing the edit privlege from the profile and then handling edit security manually on teh visual force page?
VarunCVarunC

hmm .. well I do not know if that would work, also not much clear about what you intend to say, but at this point I was convinced that it is not a possibility :( .. but plz .. if you could get a solution then it would be really thankful .. so if you a find a solution can u also guide me here then :) ...

JesseAJesseA

Did anybody find a solution for this? I have a custom button on a advanced list view that I would like to hide/show based on profiles.

VarunCVarunC

Ron's suggested solution is a working available solution for this.