function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rk yadavrk yadav 

which creating a lead if there is already a contact which the same email id then the information should be captured on the contact fields and record should not exist .


hello hai

which creating a lead if there is already a contact which the same email id then the information should be captured on the contact fields and record should not exist.

sole this forved
GauravendraGauravendra
Hi rk,

You can create a trigger (before insert) on Lead object,inside the trigger check the current lead email address with all the contacts email address.
If there is no match, then simply insert the lead record.
If there is a match, then get the remaning lead data and update the contact that have same email address.
And do not save the current lead record in that case.
You can throw error in UI to prevent the record save in this case (Using addError).

Hope this helps.