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
Michael MMichael M 

Need to import leads AND opportunities and connect them as if they were converted

We need to import a number of Leads and Opportunities, but we want to link them to make it as if the Lead was "Converted" into that opportunity. Is there any way to do so, without needing to import them as leads and then manually converting every lead?
Best Answer chosen by Michael M
VinayVinay (Salesforce Developers) 
Hi Michael,

You would need to build in custom solution (apex) to achieve above functionality.

You can check using of 'isConverted' field when a lead gets converted into an opportunity.

https://salesforce.stackexchange.com/questions/323547/how-to-convert-a-lead-to-a-new-opportunity-in-apex
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_examples_convertlead.htm

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Michael,

You would need to build in custom solution (apex) to achieve above functionality.

You can check using of 'isConverted' field when a lead gets converted into an opportunity.

https://salesforce.stackexchange.com/questions/323547/how-to-convert-a-lead-to-a-new-opportunity-in-apex
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_examples_convertlead.htm

Thanks,
This was selected as the best answer
Michael MMichael M
Thank you!