You need to sign in to do that
Don't have an account?

Status flag to determine if lead is being converted?
I've written an Account trigger to create/update a linked Contact record whenever an Account is created/updated. I want to avoid a duplicate Contact being created when a Lead is converted. Is there any Apex way to determine if you're in the middle of a Lead conversion so I can tell my trigger not to fire?
Thanks
David
Thanks
David
Any resolution to this? I have the same need/request. Thanks.
-Greg
Maybe the solution is to have an "after insert" trigger at the contact level that simply checks if the contact being created already exists. You could validate that the phone number and/or email address don't already exist for another contact associated with the same account.
This would not only prevent dupe contacts from lead conversion, it would also prevent dupe contacts being entered in manually.
Of course, you will have to test if this trigger fires when a lead is converted to an account, contact and (optional) opportunity.