You need to sign in to do that
Don't have an account?
Apex Code for lead Conversion
Hi i am working on lead conversion.I need to override the standard 'Convert' button given by salesforce with VisualForce page and write apex code for it. I need help in the following
1. There are many fields(Standard/Custom) in lead that need to be mapped to Account,Contact and Opportunity custom fields.
2. I have a picklist field 'Commodity' on Lead screen which has values 'Gas', 'Electric' and 'Both'.
If 'Both' is selected on Lead Screen then 2 Opportunity records should be created one with Commodity as 'Gas' and another with Commodity as 'Electric'.
Please help me achieve this functionality.Thanks in Advance.
Check out this link:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dml_convertLead.htm?SearchType=Stem&Highlight=lead|leading|Lead|leads|Leads||convert|converting|converts|converted|Converting|Convert|Converts
You can add the fields to the newly created account, contact, or opportunity as desired.
If you are still looking for a solution, I have explored it in this post: https://initaura.com/override-standard-lead-conversion-in-salesforce/
Hope that helps.
Thanks and Regards,
Neha Aggrawal
www.initaura.com - Everything Salesforce (https://www.initaura.com)