+ Start a Discussion

Invoke addError

Is it possible to invoke an addError() operation on the Trigger.Old list in a delete operation in Trigger ?
Dushyant SonwarDushyant Sonwar

Your question is not clear here , could you provide more info?,if you are asking to add validartion using trigger

trigger <name> on <Name of your object>(before delete){

for( <Name of your object> obj : Trigger.old){
 if(//some condition){

 obj.addError('you can't delete this');