Activity Forums Salesforce® Discussions How to handle AddError in Apex Trigger in Salesforce?

  • Marziya

    Member
    April 14, 2020 at 1:24 pm

    Hii Krati,
    Triggers can be used to prevent DML operations from occurring by calling the addError() method on a record or field. When used on Trigger.new records in insert and update triggers, and on Trigger.old records in delete triggers, the custom error message is displayed in the application interface and logged.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos