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 HelloWorldTrigger on Account (before insert) { for(Account a : Trigger.New) { if(a.name.contains('123') a.addError ('You cannot insert an account with name containing 123'); } }
trigger checkAccountName on Account (before insert) { for(Account acc:trigger.new){ if(acc.name=='123'){ acc.addError('Account name already exists.'); } } }
Hope that helps!
Please try the below code:
Please mark this question solved if this helps you !
Thanks,
Apoorv