Activity Forums Salesforce® Discussions Why there is no before-undelete event in Salesforce Triggers?

  • Anurag

    Member
    July 31, 2018 at 1:36 pm

    Hi Sanjana,

    Triggers fire as the result of an action on an object . With an object that is deleted there are really no before actions you can take, you can only undelete it. The only action available on a deleted object is after you undelete it hence the after undelete.

  • Parul

    Member
    September 10, 2018 at 7:22 am

    Hi Sanjana,

     

    There is no before-undelete event in Salesforce Triggers because, an Update or Insert can have a Before functionality as the record exists.
    Whereas there is no Record before deleting the Actual record.
    Hence only after deleting, we can have the Undelete event, whereas every record merely exists before deleting.

     

    Thanks.

     

     

  • shariq

    Member
    September 15, 2018 at 10:41 am

    Hi,

    To get more clarity -

    Triggers fire as the result of an action on an object . With an object that is deleted there are really no before actions you can take, you can only undelete it. The only action available on a deleted object is after you undelete it hence the after undelete.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

How to Learn Salesforce Development | Salesforce learning steps for beginners | Trailhead demo

Video in

In this video, we shared the steps to learn salesforce lightning basics, salesforce apex development, CRM in online for free from scratch very quickly. Learn salesforce…