function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger triggerForValidation on Account (before insert) { Set<String> allAccountName = new Set<String>(); for(Account acc:[select id,name from Account]){ if(acc.name !=NULL){ allAccountName.add(acc.Name); } } for(account acc:Trigger.new){ if(acc.Name !=NULL && allAccountName.contains(acc.Name)){ acc.addError('acccount already exists'); } } }
here is trigger for account name validation if this was helpful mark as best answer else let me know
Thank you
Avaneesh Singh