You need to understand: The after undelete trigger event only works with recovered records—that is, records that were deleted and then recovered from the Recycle Bin through the undelete DML statement. These are also called undeleted record. Undelete operation in the trigger will be fired, if you are restoring deleted record from the recycle bin. Example. If you deleted an account record, then it will be moved to recycle bin, if you restore the deleted account record from recycle bin, then undelete event in account object will get triggered.
Trigger. New will hold the new value of the record, you can't use trigger.old in after undelete trigger event. The undelete is like the insert. Before the undelete operation the record does not exist on your database.
Hope you this explanation will help you.If you like this explanation mark it as best answer so others get help from this.
Download VidMate (https://vidmate.tech/) - HD video downloader 3.5301. Fast and easily download YouTube music and HD videos. Vidmate is one of the best known applications ...
Undelete operation in trigger will fired, if you are restoring deleted record from the recycle bin. Example. If you deleted an account record, then it will be moved to recycle bin,if you restore the deleted account record from recycle bin, then undelete event in account object will get triggered.
Trigger.New will holds the new value of the record, you can't use trigger.old in after undelete trigger event. To get more details, please check this link
You need to understand: The after undelete trigger event only works with recovered records—that is, records that were deleted and then recovered from the Recycle Bin through the undelete DML statement. These are also called undeleted record. Undelete operation in the trigger will be fired, if you are restoring deleted record from the recycle bin. Example. If you deleted an account record, then it will be moved to recycle bin, if you restore the deleted account record from recycle bin, then undelete event in account object will get triggered.
Trigger. New will hold the new value of the record, you can't use trigger.old in after undelete trigger event. The undelete is like the insert. Before the undelete operation the record does not exist on your database.
Hope you this explanation will help you.If you like this explanation mark it as best answer so others get help from this.
You need to understand:
The after undelete trigger event only works with recovered records—that is, records that were deleted and then recovered from the Recycle Bin through the undelete DML statement. These are also called undeleted record.
Undelete operation in the trigger will be fired, if you are restoring deleted record from the recycle bin.
Example. If you deleted an account record, then it will be moved to recycle bin, if you restore the deleted account record from recycle bin,
then undelete event in account object will get triggered.
Trigger. New will hold the new value of the record, you can't use trigger.old in after undelete trigger event.
The undelete is like the insert. Before the undelete operation the record does not exist on your database.
Hope you this explanation will help you.If you like this explanation mark it as best answer so others get help from this.
Thanks.
Ajay Dubedi
All Answers
Undelete operation in trigger will fired, if you are restoring deleted record from the recycle bin. Example. If you deleted an account record, then it will be moved to recycle bin,if you restore the deleted account record from recycle bin, then undelete event in account object will get triggered.
Trigger.New will holds the new value of the record, you can't use trigger.old in after undelete trigger event. To get more details, please check this link
https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_triggers_recovered_records.htm|StartTopic=Content%2Fapex_triggers_recovered_records.htm|SkinName=webhelp January 28, 2015
The explanation is every clear . I refered this from:
https://developer.salesforce.com/forums/?id=906F0000000AwffIAC
Hope this Helps.
Thanks
Bhargavi.
·
You need to understand:
The after undelete trigger event only works with recovered records—that is, records that were deleted and then recovered from the Recycle Bin through the undelete DML statement. These are also called undeleted record.
Undelete operation in the trigger will be fired, if you are restoring deleted record from the recycle bin.
Example. If you deleted an account record, then it will be moved to recycle bin, if you restore the deleted account record from recycle bin,
then undelete event in account object will get triggered.
Trigger. New will hold the new value of the record, you can't use trigger.old in after undelete trigger event.
The undelete is like the insert. Before the undelete operation the record does not exist on your database.
Hope you this explanation will help you.If you like this explanation mark it as best answer so others get help from this.
Thanks.
Ajay Dubedi