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
LalitLalit 

how do I add a custom button to the Opportunity Edit layout

Curently Opportunity Edit Layout has Save and Add Product button as well as Cancel Button.

We need to add a Save button as well, incase User doesn't want to add any product for Opportunity they will simply create and save the opps.

 

Please advise how can we go to Edit layout or achieve this

 

Thanks

Lalit

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

We can not enter button on Edit layout, but if you want "Save" button and not "Save & Add Product" then there is a simple setting which you need to change.

 

Go To > Setup > App Setup > Customize > Opportunity > Settings > Uncheck the checkbox "Prompt users to add products to opportunities"

 

Now create new opportunity, "Save" will be coming instead of "Save & Add Product".

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Ankit AroraAnkit Arora

We can not enter button on Edit layout, but if you want "Save" button and not "Save & Add Product" then there is a simple setting which you need to change.

 

Go To > Setup > App Setup > Customize > Opportunity > Settings > Uncheck the checkbox "Prompt users to add products to opportunities"

 

Now create new opportunity, "Save" will be coming instead of "Save & Add Product".

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
LalitLalit

Thanks Ankit,  this works.

 

Issue is with Record type and Primary campaing associate with an Opportunity

We would like to customize the solution for Standard and Placement Opportunity only , and  only if it has a primary campaign. In this case we should show Save button and for other Opportunity type we should show Save and Add Product Button

 

For Bid,registered Deal. Promo Opportunity we still need Save and Add Product Button.

 

 Is there a way to customize this option further with Opportunity type and Primary campaign

LalitLalit

Also is there a way to keep both save as well as save and Add Product button on edit layout of Opps

Ankit AroraAnkit Arora

I don't think we can do this, just find out the idea section if some one have already suggested this or not. If not then post an idea regarding this.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page