You need to sign in to do that
Don't have an account?
Mrityunjay Patel 18
write the trigger on contact for update custom field
update condition
if contact email is null then insert the some xyz@mail in email field
if contact email is not null then copy the value of contact email in custom field cemail_c on contact
if contact email is null then insert the some xyz@mail in email field
if contact email is not null then copy the value of contact email in custom field cemail_c on contact
trigger UpdateEmail on Contact (before insert) {
if(Trigger.isInsert)
{
if(Trigger.isBefore)
{
for(contact con:Trigger.New)
{
if(con.email==null)
{
con.email='xyz@gmail.com';
}
else
{
con.cemail_c=con.email;
}
}
}
}
}
I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.
Thanks and Regards,
Suraj Tripathi