How to Retrieve large number of deleted records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 11:34 AM
Management asked me to deleted 10,000 Records and now they want them back.
I went to Deleted Records module and saw the records exist: but here, its hard to keep selecting 200 records at once and undelete the records.
Is there any other way to retrieve all those records at once?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 07:16 AM
Thank you Nathan, this works perfect but:
When i keep the filters on the audit table as one particular date when the records were deleted: 20th of this month
var deleted = new GlideRecord('sys_audit_delete');
deleted.addEncodedQuery('sys_created_onON2017-08-11@javascript:gs.dateGenerate('2017-08-20','start')@javascript:gs.dateGenerate('2017-08-20','end')');
deleted.query();
while(deleted.next()){
var x = deleted.getRowCount();
}
gs.print(x);
Here i get this ERROR: ERROR at line 2: Expected ')' and instead saw '2017'.
How do i get rid of this error? though the query is copied from the Breadcrumbs

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 07:49 AM
deleted.addEncodedQuery("sys_created_onON2017-08-11>javascript:gs.dateGenerate('2017-08-20','start')>javascript:gs.dateGenerate('2017-08-20','end')");
now you will not get an error. please make sure what have you build in encoded query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 08:04 AM
Thank You All