1

In person Accounts enabled org, when you convert a Lead linking existing Contact (i.e. Person Account), it doesn't seems to run the Account triggers upon Contact update.

for example, Lead Lead A has email: [email protected], Existing Person Account PA email is empty.

When you convert the Lead, it's linking the existing contact. and Account PA email is now updated with '[email protected]'.

But the Account trigger is not running.

trigger AccountAction on Account (before insert, before update) {
    System.debug('Trigger ran');
    //AccountHandler.handle(Trigger.new, Trigger.oldMap, Trigger.old, Trigger.isInsert, Trigger.isUpdate, Trigger.isDelete, Trigger.isUndelete, Trigger.isBefore, Trigger.isAfter);
}

I assumed this is because it's updating Contact Email field which is personEmail field on personAccount. But assuming the same thing (i.e. not running Account trigger) should happen when I update related Contact Id via Apex, I ran the below in execute Anonymous in Developer Console.

update new Contact(Id = '003p004060ePGFsAAO', Email = '[email protected]');

Surprisingly it executed the Account trigger.

Wondering what causes Lead Conversion not to run the Account trigger.

Appreciate any help to understand the reason? proper workaround to run Person Account trigger upon Lead conversion.

Cheers!

1 Answer 1

0

Found there is Require Validation for converted Leads checkbox under Setup->Lead settings. Checked this setting and that fixed the issue.

Require Validation for converted Leads

You must log in to answer this question.

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