1

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. Because even though it's easy to detect the created account at Lead before update trigger, fields need to be populated before the record is being inserted.

3
  • 2
    I'm not sure I understand the question. From what I can figure out, you have a field on Lead which you want to pass to the Account on conversion to then do something with in a trigger? If you use the "Map Lead Fields" feature then fields from Lead can be passed to the created Account and Contact objects during the conversion operation, those values should be available in the before insert context of those objects. Commented Aug 8, 2014 at 10:27
  • Not sure if it is what Alex is asking, or if this is a question about just being able to fire an Account trigger only when the account insert is as a result of lead conversion.
    – pchittum
    Commented Aug 8, 2014 at 10:32
  • yeah yeah @AlexTennant you throw me into the correct path. I didn't know and my poor googling couldn't able to catch "Map Lead Fields" which is clearly described in help.salesforce.com/apex/… Can you please post this as answer so that we can help lot more in the community?
    – highfive
    Commented Aug 8, 2014 at 10:42

1 Answer 1

1

You can use the Map Lead Fields feature to pass fields from your Lead records directly to the Account and Contact records that are created during the Lead conversion process. These values will then be available to you in your Account and Contact before insert contexts.

The Map Lead Fields feature can be found in Setup > Customize > Leads > Fields > Lead Custom Fields & Relationships > Map Lead Fields.

The default mappings for the standard fields can be found here.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .