You need to sign in to do that
Don't have an account?

Convert Lead - Apex
Hello,
I have to convert lead to many opportunities (based on multiselect list Country) - creating as many opportunities as selected countries.
When converting a lead, there is always one more opportunity that is created (the standard opportunity).
How can I eliminate the creation of this opportunity?
Thanks
I have to convert lead to many opportunities (based on multiselect list Country) - creating as many opportunities as selected countries.
When converting a lead, there is always one more opportunity that is created (the standard opportunity).
How can I eliminate the creation of this opportunity?
Thanks
Take a look at the ConvertLead Operation. Specifically, the setDoNotCreateOpportunity method. Below is an example of how to convert a lead within Apex, without creating an opportunity.
But in my case, I have to create specific opportunities. My code allows the creation of these opportunities but there is always the standard opportunity that is created. If I add the method 'setDoNotCreateOpportunity', in my code there is no opportunity created.