+ Start a Discussion

before insert on Contact not firing on Lead Conversion

I've got the following trigger which simply puts the Account.OwnerId in as the Contact.OwnerId before insert.  When I convert a lead, the trigger doesn't work -- but only in Production.  When I do this in a Development instance, it does work. 
Why would this be?  It is the only "before insert" trigger that I have on Contact.  The only other trigger I have is a "before update" one.  I've got no triggers on Lead.  I find it very strange!!


trigger contactInsertOwner on Contact (before insert) {

Set<Id> accSet = new Set<Id>();

     for ( Contact newContact : Trigger.new )




Map<Id, Account> accMap = new Map<Id, Account>([select Id, OwnerId

                                   from Account where Id in :accSet]);

        for ( Contact updContact : Trigger.new )


              updContact.OwnerId = accMap.get(updContact.AccountId).OwnerId;



There's an option to allow the firing of triggers on lead convert. It's under Setup -> Customize -> Leads -> Settings and you'll see a checkbox you need to check.

If that's not it... I'm stumped for a bit. =)

I don't have this option there.  The only option I have is "Do Not Change Lead Status Values to New Owner's Record Type on Lead Conversion." 

That doesn't seem to have anything to do with triggers firing on lead conversion.

I should have searched before I ever put this in ... Thanks for the advice  :smileyvery-happy:... I've put in a ticket with support to let them know that they need to unhide this option so that I can choose it.