You need to sign in to do that
Don't have an account?
Mike Jack
Lead Conversion Field Mapping
Hi All,
Is there any possibility to get Lead Conversion Mapping Fields in Apex ??
I am trying to customize the Lead Conversion Process as per our requirement and I need to get what all Lead fields are mapped to Account/Contact/Opportunity.
Please let me know if it is possible by anychance.
Thanks in advance..
Is there any possibility to get Lead Conversion Mapping Fields in Apex ??
I am trying to customize the Lead Conversion Process as per our requirement and I need to get what all Lead fields are mapped to Account/Contact/Opportunity.
Please let me know if it is possible by anychance.
Thanks in advance..
I dont think you need to Write Apex code for this.
Follow below steps Setup Lead field mapping:
1. Go to Setup.
2. Under Build, click Customize | Leads | Fields.
3. Under "Lead Custom Fields & Relationships," click the Map Lead Fields button.
You can map fields from here only.
Cheers :)
Please mark this answer as best answer if query is resolved so that it helps others
What you said is 100% correct., what all fields we mapped there from Lead to Account/Contact/Opportunity, I need to get those field mappings in Apex.
Some time we need to pass one object information to another object. So in this regards developer needs to write a trigger / apex code and needs to define each column mapping in the code. But it may be possible that in future field mapping will change or some new fields will introduce. For that we again need to change code.
So for above requirement we have created a object Pre-lead and on same object we have created a button convert lead. while converting the pre- lead into lead we need to provide dynamic field mapping between two object. For that i have created the custom setting "MyLeadToLeadMapping__c" with one custom field "Lead_Field_API_Name__c"
Code:
I Hope this is useful information for you ,please mark my answer as best answer.
Thanks,
Varun
Really appreciate your response and this information with code might definitely useful for us.
We already have this workaround in mind to use Custom Settings or Custom Metadata Types. Camparing with your scenario with ours, your Pre-Lead is our Lead and your Lead is our Contact. When we have Standard Lead mapping fields., its like double work to again map fields in Custom Settings or Custom Metadata.
We need to get the Mapping fields which are mapped from Lead to Contact in Apex as we are customizing conversion process.
Unfortunately the Lead Convsersion field mappings aren't available in APEX or the Metadata API.