You need to sign in to do that
Don't have an account?
Tiffany Bunnell
Duplication Error Trigger
Hi,
I have accounts that are being duplicated and assigned to a different person on a daily basis. Currently Salesforce has duplicated hundreds of accounts over the last 30 days and I now have about 35,000 extra accounts. I am being told that it is related to trigger "dc3AccountTrigger". I am not a developer and have no in-house developer. And I have no clue what I am supposed to do to fix the problem. Can anyone help me?
Thanks,
Tiffany
I have accounts that are being duplicated and assigned to a different person on a daily basis. Currently Salesforce has duplicated hundreds of accounts over the last 30 days and I now have about 35,000 extra accounts. I am being told that it is related to trigger "dc3AccountTrigger". I am not a developer and have no in-house developer. And I have no clue what I am supposed to do to fix the problem. Can anyone help me?
Thanks,
Tiffany
trigger Duplicatename on Account (before insert, before update) {
set<String> strString = new set<String>();
for(Account acc:Trigger.new){
strString.add(acc.Name);
}
List<Account> accList = [select Id, Name from Account where Name IN:strString];
set<String> strStr = new set<String>();
for(Account acc1:accList){
strStr.add(acc1.Name);
}
for(Account acc:Trigger.new){
strStr.contains(acc.Name);
acc.addError('Duplicate');
}
}
Arundhati Dutta
Mirketa Inc.