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
Kartik BhallaKartik Bhalla 

how to get the old value of sequence number field to restore the record at the same position(same sequence) after undelete

I am making an after undelete trigger for restoring the records on the same position as it was on before deleting & for that I need the  old value of a sequence number field(custom field). I have a custom number field which I am incrementing sequentially using insert trigger. Suppose I have 5 records who're having sequence num 1,2,3,4,5 and now if I delete one record(say 3) I rearranged the list to 1,2,3,4 using the delete trigger but now if i want to restore it back to the same position after undelete what should I do plz help...