+ Start a Discussion
JDeitzJDeitz 

Remove [New] button from central Tab screen

I'd like to remove the [New] button from the Opportunity tab (screen).  But I don't want to alter the Opportunity [New] functionality elsewhere.
 
How do I do this? 
Best Answer chosen by Admin (Salesforce Developers) 
goabhigogoabhigo

I found out solution for my problem - Override the New button with VF page(display an error message). In my case,my client did not want to create New Opportunity directly.

All Answers

Ron HessRon Hess
you would have to rebuild the tab screen without the new button, there is no other way to remove that button from the opportunity home tab
cmarz_1cmarz_1
Did you ever get this done - I have the same problem.  Support has informed me the button is hard coded and can't be removed which seems short sighted to me.  Seems like rebuilding the entire page in VF is no small task.
goabhigogoabhigo

Thats a bad news to hear..

homer671homer671

Is there an idea that I can promote for this?

goabhigogoabhigo

I found out solution for my problem - Override the New button with VF page(display an error message). In my case,my client did not want to create New Opportunity directly.

This was selected as the best answer
homer671homer671

I did that too, but I still think it should be hidden if it's just going to be an error.   But since I did that too I'll accept it as a solution.

goabhigogoabhigo

Yes I agree.

Hey, in your case you can override the Opportunity tab with VF. Write code for list view which shows all the opportunities.

Something like this....


VF page:

<apex:page StandardController="Opportunities" extension="OpController" action="{!methodOnLoad}">

</apex:page>

 

Your controller:

 

 

public class OpController{
public PageReference methodOnLoad()
{
String ObjectPrefix = Opportunity.sObjectType.getDescribe().getKeyPrefix();
// or Opportunities am not sure
PageReference pr = new PageReference('/' + ObjectPrefix + '/o');
pr.setRedirect(true);
return pr;
}
}

Please let me know any changes to be done. If urs is professional edition then i dont think you can write apex classes.In that case please ignore this.

Jacob FeenstraJacob Feenstra
I created a VF page to override the New button on the Opportunity Tab but it appears to override the standard new and custom new buttons in the Opportunity related lists as well, so now I have no way of creating a new opportunity.  I submitted a case with Salesforce support and I was told that the standard new and custom new buttons are linked so if you override one, you override them all.  As such, they are indicating that the only way to get around it is to create a complete new visual force page that replaces the opportunity tab.  It appeared that overriding the new button itself would work based on this discussion string but is that because you in fact do not need to create new opportunities???