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
kabkab 

How Can I hide the custom List button on a out of box List view page?

I have a list Button on a Salesforce Outof Box page. Using that List button I open a visualforce page. I want to hide that button to some users/profiles. I don't see any way to do that.

Can you please let me know if there is a way to hide for a profile.

 

To reproduce this. you can Create a List Button on Opportunity Buttons & Links

2. Assign that button in  Opportunity Search Layouts/Opportunities List View

 

go to Opportunity Tab and Claik Go  and you should see the button next to "Go" Button.

 

thanks

in advance.

mtbclimbermtbclimber

You can't conditionally display custom list buttons on the listview page today.   You can conditionally display the visualforce page under the covers or simply leverage page-level security to control which users can access which pages but that doesn't affect the visibility of the button, though arguably it should ( I suggest logging an idea for that on the ideaexchange)

 

You could also override the list button for the given object and conditionally include the button or conditionally redirect to the standard list page for users that don't have access to the button.

 

 

kabkab

Thanks Andrew. I will add this in Idea exchange

DevNVDevNV

Is there a way to use a VF page to show a custom button and have it act on a List View that is showing below?  That might give us a way of showing the VF page to some users who should have access to the button.  Something like the following:

 

<apex:page standardController="Account" extensions="AccountTabInternal" >
  <apex:form >
      <apex:commandButton value="Do my Custom Logic" />
  </apex:form>
      <apex:enhancedList type="Account" height="400"/>
</apex:page>

 

 I'm not sure how to have the controller extension gain access to the selected records in the Enhanced List component - maybe it is not possible?  Any thoughts would be appreciated!