Activity Forums Salesforce® Discussions what is difference between after undelete and after update in salesforce?

  • what is difference between after undelete and after update in salesforce?

    Posted by Manish on July 23, 2020 at 3:39 pm

    what is difference between after undelete and after update in salesforce?

    Shweta replied 4 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Shweta

    Member
    July 23, 2020 at 3:51 pm

    After Undelete: It is available in Salesforce but for limited set of objects. The after undelete trigger events only run on top object. e.g. if you delete an Account, an Opportunity may also be deleted. When you recover the Account from the Recycle Bin, the Opportunity is also recovered.
    After Update: A runtime error is thrown, as trigger.new is already saved. And the updates are saved before the object is deleted, so if the object is undeleted, the updates become visible.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos