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
Josef AslanJosef Aslan 

Workaround mapping standard leads field into contacts field

I'm set-up to mass convert leads into contacts via APEX code. The problem that I encounter is that the value of the leads "Company" field has to be transmitted into the new contacts object. As I figured out, it is not possible to map standard lead fields into custom contacts fields, and by default, the "Company" field does not get transmitted into the contacts object. This is necessary, so that in the future we have the option to filter contacts based on their "Company" value.
Best Answer chosen by Josef Aslan
SwethaSwetha (Salesforce Developers) 
HI Josef,

You are correct that it is not possible to map standard lead fields into custom contact fields by default.

You can create a trigger on the lead object that copies the value of the "Company" field to a custom field on the contact object when a lead is converted to a contact. This will allow you to filter contacts based on their "Company" value in the future.

Related:
https://www.salesforceben.com/salesforce-best-practices-lead-object/
https://help.salesforce.com/s/articleView?id=000389970&type=1
https://www.salesforceben.com/5-salesforce-lead-contact-hacks-every-admin-should-know/

If this information helps, please mark the answer as best. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI Josef,

You are correct that it is not possible to map standard lead fields into custom contact fields by default.

You can create a trigger on the lead object that copies the value of the "Company" field to a custom field on the contact object when a lead is converted to a contact. This will allow you to filter contacts based on their "Company" value in the future.

Related:
https://www.salesforceben.com/salesforce-best-practices-lead-object/
https://help.salesforce.com/s/articleView?id=000389970&type=1
https://www.salesforceben.com/5-salesforce-lead-contact-hacks-every-admin-should-know/

If this information helps, please mark the answer as best. Thank you
This was selected as the best answer
Josef AslanJosef Aslan
Worked perfectly, thanks!