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: test@test.com, 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 'test@test.com'.

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 = 'test@test123.com');

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!

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.