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
madhu_ramadhu_ra 

Populating Account record from Lead in an Account before insert trigger

Hi All,
There are lot of discussions on Lead conversion. I'd just need to know is there any possibility to track whether the Account is being created upon a Lead conversion and if collecting information of the lead inside an Account before insert trigger.
Lead to Account relation can be handled in a Lead trigger since convertedAccountId field is there. But is there any relevant field in Account object?

I'm trying to overcome a "duplicate unique field" issue and thinking handle this in Account before insert trigger.
Best Answer chosen by madhu_ra
madhu_ramadhu_ra
Found it. This can be done in several ways depend on the field type. 
1). If you need to detect Lead standard fields those fields can be accessed as described in here (http://help.salesforce.com/HTViewHelpDoc?id=lead_conversion_mapping.htm&language=en_US). 
2). If you need to detect Lead custom fields you can use "Map custom Lead fields" as described in here.

T
hanks,
Madhura