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
kdcSFDCliferkdcSFDClifer 

Override Create New Button in order to Auto-Populate Certain Info Upon creation

HI! 

 

What I'd like to do is rather simple, I imagine, but I do not know how to do it. 

 

In our sales process we have "sell-ups" or opportunities that are a direct result of a previous opportunity.  I've created a related relationship so-to-speak for sell-ups to its original opportunity. 

 

For a user to create a "sell-up" they go

1. Go to the original opportunity

2. in the related list section, they hover over "Sell-up" and click Create New Sell-up Button

 

I need this button, when clicked, to open a record that will have some information already populated from the original opportunity such as Account Name, and Opportunity Type.  Once I know how to do one or two fields, I can probably figure out the rest.  

 

 

Thanks a Million! 

purupuru

Hi,

 

Yes you can do this for this you need to follow the below steps.

 

  1. Create new VF page with standred controller Opportunity.
  2. Add your bussiness logic to populate the info of orignal opportunity.
  3. Now click Setup-->Customize-->Opportunity-->Buttons and Links
  4. In Standred button and links click edit of "New" button.
  5. Now select Override With, from it select  above created VF page  (from step 1) and click to save.

Now your new button is overriderd with your custom VF page.

I hope it will help to you.

 

Regards,

Purushottam