How to fix deleted record.

Supriya25
Tera Guru

 

Hi All,

Kindly help me on below issue.

Supriya25_0-1769286044166.png

 

var gr = new GlideRecord("sys_history_line");
gr.addEncodedQuery("set=306b22cf93e676501a1bf6fa3d03d628^sys_idSTARTSWITH057ba2cf93e676501a1bf6fa3d03d656");
gr.query();
if (gr.next()) {
    gr.deleteRecord();
}

 I have executed above code in background script. after deletion of history line  I did check in Deleted record, delete recovery table , I didn't  find any trace around sys_history_line record which I deleted from background script. how it is possible ?

when I did check sys_audit table, there I saw one record  on 'sys_delete_recovery'  exact time match with my script execution . how it is possible. I didn't touch "delete recovery "table. 

Supriya25_0-1769284658057.png

Supriya25_1-1769284685839.png


now how can recover my 'history line'.

1 REPLY 1

Bert_c1
Kilo Patron

That table is managed by the instance, deleted records there won't work. And that table will be refreshed when any user access the record's history.