Activity › Forums › Salesforce® Discussions › Why there is no before-undelete event in Salesforce Triggers?
Tagged: Before Undelete, Events in Salesforce, Salesforce Event, Salesforce Triggers, Triggers in Salesforce, Undelete Event
-
Why there is no before-undelete event in Salesforce Triggers?
Posted by Sanjana on July 4, 2018 at 7:56 AMWhy there is no before-undelete event in Salesforce Triggers?
shariq replied 7 years, 9 months ago 4 Members · 3 Replies -
3 Replies
-
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.
- [adinserter block='9']
-
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.
-
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.