You need to sign in to do that
Don't have an account?
imishra
Duplicity Check on Account
Hi,
I fill in my Account Details and click on the submit button.
On click of "submit", i need to check on the Account Name, Company Name, Website and Shipping Address. If any of these things are matching with any other records i need to throw an error saying "Duplicate Account".
Please let me know how can i configure this on the "Submit" button.
Any help appreciated.
Thanks in advance.
I fill in my Account Details and click on the submit button.
On click of "submit", i need to check on the Account Name, Company Name, Website and Shipping Address. If any of these things are matching with any other records i need to throw an error saying "Duplicate Account".
Please let me know how can i configure this on the "Submit" button.
Any help appreciated.
Thanks in advance.
trigger AccountDuplicateTrigger on Account (before insert,before update) {
for(Account a:Trigger.new)
{
List<Account> acc=[select ID from account where Name=:a.Name and Rating=:a.rating];
if(acc.size()>0)
{
a.adderror('You cannot create a dulplicate account');
}
}
}
All Answers
trigger AccountDuplicateTrigger on Account (before insert,before update) {
for(Account a:Trigger.new)
{
List<Account> acc=[select ID from account where Name=:a.Name and Rating=:a.rating];
if(acc.size()>0)
{
a.adderror('You cannot create a dulplicate account');
}
}
}