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

convertLead () Function Question

I have a convertLead trigger I'm writing and had a question that I wasn't 100% clear on after some reading.


When using that function in an Apex trigger, does convertLead use the field mapping already set in Salesforce or does thiat function as a trigger work independently of the conversion mapping within the system?   In other words, do I need to map out all my custom fields a second time in the trigger?





in the following pdf "mapping fields" on page 221 implies that field mapping is not required for second time in trigger. Are your fields not being mapped?


Thanks - I read that too.  That section on field mapping wasn't explicit enough for me.  


I haven't tried it yet - but i know i am going to use a trigger for lead conversion.   I just didn't want to setup field mappings in only to have to write them into the trigger.


either way let me know the result just for my knowledge.


I finally got back to that code - turns out that convertLead() does actually use the default settings without having to write out any maps when using that function.


I was very happy to find that out!  :)