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

  • How to handle AddError in Apex Trigger in Salesforce?

    Posted by krati on April 14, 2020 at 12:11 pm

    How to handle AddError in Apex Trigger in Salesforce?

    Marziya replied 4 years ago 2 Members · 1 Reply
  • 1 Reply
  • 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