Activity Forums Salesforce® Discussions What would happen if I perform a DML update operation on the before update trigger of the same sObject record in Salesforce?

  • What would happen if I perform a DML update operation on the before update trigger of the same sObject record in Salesforce?

    Posted by Prachi on November 4, 2019 at 5:08 am

    What would happen if I perform a DML update operation on the before update trigger of the same sObject record ?

    Nikita replied 5 years ago 2 Members · 1 Reply
  • 1 Reply
  • Nikita

    Member
    November 4, 2019 at 5:17 am

    Hi Prachi,

    When the trigger is fired there is a before and after, the before is used to update the current record without stating any DML. since the record is open for update/Insert. if you specify any DML during the before action, you will receive an Exception "You cannot Update and Active Entity".

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos