trigger dupicaterecord on Account (before insert) {
for(Account a:trigger.new){
if(a.AccountNumber == null){
a.AccountNumber.addError('the field should not be empty');
}
}
}
for(Account a:trigger.new){
if(a.AccountNumber == null){
a.AccountNumber.addError('the field should not be empty');
}
}
}
No comments:
Post a Comment