You need to sign in to do that
Don't have an account?
Mahesh K 22
Test Class for this before trigger
trigger acctrgr on Account (before insert) {
for(account a : trigger.new){
if(a.phone == null){
a.phone.adderror('phone filed not equla to null');
}
}
}
for(account a : trigger.new){
if(a.phone == null){
a.phone.adderror('phone filed not equla to null');
}
}
}
Mahesh,
Let me know if you have any issues.Try this class
Mark it as best answer if it works.
Thanks.