Is it possible to remove/hide the “New” button?

When you click on the Opportunities tab, (assuming you haven’t modified standard salesforce layout), you see a “Recent Opportunities” list. At the top of the list, there is a “New” button.

enter image description here

Is there a way to hide the “New” button displayed on this page? I have tried disabling the button on the “Opportunity List View” Search Layout[Setup -> App Setup -> Opportunities -> Search Layouts], but it does not remove the button from this particular view.

Answer

We use homepage components which analyse the page, and use javascript to remove/add buttons where we have no other choice to do so.
But this implies developing with a high dependency on the salesforce html output .. which is not guaranteed to stay unchanged, this is something to strongly consider if you would explore this approach.

Why do you want to remove the new button ? If there are groups of users who should not make opportunities, you may want to restrict them access through their profile.

update:
For instance, using jquery:

if (document.location.href.toString().indexOf("/a49/o") != -1) {
        $('input[name=new]').hide(); 
 }

You would need to update the Id when migrating code between sandboxes/organisations.

Attribution
Source : Link , Question Author : Anup , Answer Author : Samuel De Rycke

Leave a Comment