You need to sign in to do that
Don't have an account?
sunny_mhl10@yahoo.com
Duplicate Check
Hi
We have created Web-To Lead form . We want it should check that name does not exists in Accounts then it should save the record else it should give message that name already exists.
Thanks
Hi,
You have to write a trigger on Lead which will check before inserting the lead from web to lead.
Trigger DuplicateLead on Lead(before insert)
{
List<Account> ac=[select id,name from account where name=trigger.new[0].lastname];
If(ac.size() > 0)
{
// Use adderror method to display the error that you want to display.
}
}
All Answers
Hi,
You have to write a trigger on Lead which will check before inserting the lead from web to lead.
Trigger DuplicateLead on Lead(before insert)
{
List<Account> ac=[select id,name from account where name=trigger.new[0].lastname];
If(ac.size() > 0)
{
// Use adderror method to display the error that you want to display.
}
}
Hi
It is giving me error on line 3
unexpected token: 'trigger.new' at line 3 column 57
Thanx
Hi
It is resolved.
Thanx