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
Nadia GainsbourgNadia Gainsbourg 

How to create a visualforce page with opportunity record types

We need to start creating opportunities on converting leads (up until now we've been creating them from accounts) and we have existing opportunity record types. When I uncheck the "Do not create a new Opportunity upon conversion" checkbox when converting a lead, I want a Visualforce page with the existing record types to come up so that a rep can select the correct one. Thank you!
Vivian Charlie 1208Vivian Charlie 1208

Hi Nadia,

 

Unfortunately you cannot override the existing functionality of the LeadConversion page. A work around for this would be to have a custom lead Convert button on the Lead detail page.

 

This button will open a VF which will provide functionality similar to standard lead conversion. Additionaly you can then have your customization to redirect to a different VF if the checkbox is unchecked.

 

You can find all the necessary help for lead conversion using apex at this standard help page

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_convertLead.htm

 

Thanks

Vivian

Nadia GainsbourgNadia Gainsbourg
Thank you, Vivian. I'll try that!