+ Start a Discussion

In trigger there have some piece of code after addError method , how it will be execute?


I have some confussion, In trigger there have  some piece of code with after addError method , how it will be execute?

Please give me the solution,

Thanks in advance
you cannot execute any other logic after adderror method. This should always be your last statement in logic which should be displayed in case there is an error while processing. addError (errorMsg) Marks A Record With A Custom Error Message And Prevents Any DML Operation From Occurring.
You can handle error in such case. do your logic and than display a message.
Can you elaborate a little why you need to execute the logic even after some error has been occured in trigger processing?