Find your content:

Search form

You are here

Any way to convert leads in apex without using the convertLead() method?

 
Share

The customer's spec requires some standard fields on leads to be mapped to custom fields and vice versa. I've been trying to override the lead conversion behaviour by writing an apex class. Mapping the fields isn't difficult but actually marking the lead as converted in the same way that SF does is proving difficult. I don't want to use the convertLead method because that automatically maps fields to fields I don't want them mapped to.


Attribution to: Adam

Possible Suggestion/Solution #1

No, all successful conversions will use convertLead, either by UI's leadconvert.jsp, API's convertLead, or Apex Code's convertLead. Since you're writing your own code to handle the conversion, simply call convertLead, then call an update on the account to fix the fields that need intervention.


Attribution to: sfdcfox
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34165

My Block Status

My Block Content