Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
hi guys, please explain about afeter undelete

when we will use after undelete in trigger.new?
2 answers
  1. Jan 28, 2015, 11:04 AM
    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
0/9000