+ Start a Discussion

Code for custom buttom

I created a custom buttom. Is there code for when I click the button to create an Opportunity it fills in the the Opportunity field?

Andy BoettcherAndy Boettcher

Are you talking about the "Opportunity Name" field?


Create a custom button with type "URL" and use the below url.


Use this if you are in a sandbox environment:




Use this if you are in a production environment:



Both the above URL's will take you to a new page with the name of the opportunity pre-populated.

As an example this will populate the opportunity name as "sample". Replace that with whatever you like and also you can use merge fields for dynamic data to be populated under opportunity name.


If you still need any clarification reply to this message.