+ Start a Discussion
Atul GuptaAtul Gupta 

How to fire before triggers on Lead Conversion

I'm facing a weird issue. I am converting leads in after insert Lead Trigger, but I'm not able to fire Before Triggers on Contact that is being created on Lead conversion.

Yes I've checked the "Require Validation for Converted Leads" checkbox, but still the before triggers are not firing.

User-added image
Amit Chaudhary 8Amit Chaudhary 8
You do one thing create one hidden field From lead check box on contact and make that check box as true at the time me lead convertion and try
Atul GuptaAtul Gupta
Amit, how is that gonna help me?

I actually need to assign contacts that are being converted on lead conversion to a particular user.
I'm doing this in Before Contact triggers.

If I try to do this in After trigger of Contact, the update operation fires the Contact trigger again in recursion, although I've stopped the recursion but my entire logic gets messed up.
Amit Chaudhary 8Amit Chaudhary 8
Please check below post. I hope that will help you
1) http://salesforce.stackexchange.com/questions/3956/lead-conversion-trigger-order-of-execution

Before Trigger should be execute after updating lead setting.
Account Before                 (Fires based on lead settings)
Account After
Contact Before                 (Fires based on lead settings)
Contact After
Opportunity Before             (Fires based on lead settings)
Opportunity After              (OCR's not available)
Lead Before
Lead After                     (OCR's available)

But Still you can try After Trigger to resolve your issue. To fix the recursive trigger issue . Please check below post. i hope that will help you

Atul GuptaAtul Gupta
Amit, thank you for the reply.

Yes I've seen that discussion. The problem is I can't use after update trigger to assign contact to a particular user as the logic is different when a contact is created and updated.
If I update a the contact after it is created on lead convert, the update logic would fire and I don't want to do that :(