You need to sign in to do that
Don't have an account?

Hiding buttons on enhancedlist
Hi i was implementing a enhancedList for my custom object called 'Standard__c'. I wanted to hide the 'New Standard' button that automatically appears at the top.
I have tried a similar thing with listViews (which also has the button) and it worked.
In both cases the button is made up from an input element with the name attribute set to 'assign'. The following jQuery worked for listViews, but not enhancedList:
j$("input[name=assign]").hide();
The only difference i can think of, is that the listView buttons are in a span:
<span><input value="New Standard" class="btn" name="new" onclick="navigateToUrl('https://na14.salesforce.com/a09/e?retURL=https%3A%2F%2Fc.na14.visual.force.com%2Fapex%2FlistStandards%3Fcore.apexpages.devmode.url%3D1','LIST_VIEW','new');" title="New Standard" type="button"></span> <span><input value="Change Owner" class="btn" name="assign" onclick="this.form.action = 'https://na14.salesforce.com/_ui/core/customentity/CustomEntityDataTemplateMassAction?retURL=https%3A%2F%2Fc.na14.visual.force.com%2Fapex%2FlistStandards%3Fcore.apexpages.devmode.url%3D1&from=&ent=01Id0000000o09n'" title="Change Owner" type="submit"></span>
Whereas on the enhancedList, the button is within a list. Do i need to be handling the list elements also?
<div class="listButtons" id="j_id0:j_id5_listButtons"> <ul class="piped"> <li><input value="New Standard" class="btn" name="new" onclick="navigateToUrl('https://na14.salesforce.com/a09/e?retURL=https%3A%2F%2Fc.na14.visual.force.com%2Fapex%2FlistStandards%3Fcore.apexpages.devmode.url%3D1','LIST_VIEW','new');" title="New Standard" type="button"></li> <li><input value="Change Owner" class="btn" name="assign" onclick="this.form.action = 'https://na14.salesforce.com/_ui/core/customentity/CustomEntityDataTemplateMassAction?retURL=https%3A%2F%2Fc.na14.visual.force.com%2Fapex%2FlistStandards%3Fcore.apexpages.devmode.url%3D1&from=&ent=01Id0000000o09n'" title="Change Owner" type="submit"></li> <li class="lastItem"><input id="j_id0:j_id5_refresh" src="s.gif" href="javascript:void(0)" onclick="javascript:ListViewport.instances['j_id0:j_id5'].refreshList()" class="btn refreshListButton" title="Refresh" type="button"></li> </ul></div>
I figured it out (to a point).
I can hide the button from all enhancedLists by going to Setup -> Create -> 'MyObject'. In the 'Search Layouts' section you can edit the 'Standards List View' entry. In there you can uncheck it from the 'Standard Buttons' list.
... I would still like to figure out how to just disable it for the one instance of a list, rather than all.