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
TheRotnelsonTheRotnelson 

Lead conversion in Apex with conversion field mapping

Hi all,
Anybody who has sucsessfully managed to convert leads trough the API with customized conversion field mapping?

The documentation claims that lead conversion field mapping is also applied when doing the conversion in Apex code, but I can not get custom fields converted to the target account
ShashankShashank (Salesforce Developers) 
You will not be able to change the lead conversion mapping through the API. Please elaborate if your question is different.
TheRotnelsonTheRotnelson
The question was not about changing the field mapping. The conversion field mapping configured in the set up menu is not applied at all when converting lead using the proper apex convert lead methods. Just the standard field mapping is applied.
ShashankShashank (Salesforce Developers) 
I tried replicating this in my test org, and the custom field mapping worked fine. If you are still facing this issue, please emaail me at ssrivatsavaya@salesforce.com with your org id, exact replication steps and grant login access to salesforce support, so that I can investigate the cause. Please reference this post in the email.