function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RoyalRoyal 

Undelete trigger context variable ?

In Trigger context variable only available after undelete, but not there before undelete,  want to know what is the reasion behind that ?

can you have knowledge on this pls help me ...

Thanks
 
edoardo_spanoedoardo_spano
Hi,
because the undelete is like the insert. Before the undelete operation the record does not existon your database, so there's no the before version.
Why do you need the before context?

Bye
RoyalRoyal
Hi edoardo
But for before insert also record is exist in database but we have the before insert event, like that we should have the before undelete right ?
edoardo_spanoedoardo_spano
Hi boyapati,
sorry, I got confused with Trigger.old, that is not available in undelete triggers.
Unfortunatly I don't know (and I don't find) why before undelete is not available.

If you could let me know why you need it, I could try to help you.
Bye
RoyalRoyal
Thanks NP, just want to know that, what is the reason behind thats it .....:)
sandeep reddy 37sandeep reddy 37
i got the same doubt ineed to check who is undeleting my record  what about that time
 
Sreenivas LatchuSreenivas Latchu
Hello Indian, I can help you in getting the clear picture. The trigger contexts are defined for DML operations. When user tries to Undelete a record from recycle bin , there is a possiblity for a record insertion and hence after undelete is applicable for trigger context. In case of Before Undelete there no thought of DML opertaion. 

If explaination helped mark as solution.