how to restore multiple archived incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 12:26 AM
Hello All,
I want to restore some 15 k incidents from archive table.
can you please give a suggestions.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 03:47 AM
@karan: i have used the same script syntax as you provided i just given our incident number sysID in sysid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 05:24 AM
@chandana16 - use archive table record's sys id, not the incident's, example:
new GlideArchiveRestore().restore('abf234354r2.....');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 07:32 PM
@karan: Yes karan, i have used archived record's sys ID only.
I can able to restore single record. 🙂
But when i tried for multiple records, i'm getting bad response
my script looks like this:
var er = new GlideRecord(sys_archive_log);
er.addEncodedQuery(' i'm giving list of incidents query here');
er.query();
while(er.next()){
var sr = new GlideArchiveRestore().restore(er.sys_id);
}
correct me if i'm wrong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 04:31 AM
Hi Karan
i again tried to test it for 1 record, it got restored
Thank you so much for the help 🙂
but for multiple records, i'm getting the bad response since we are gliding archive log table
any suggestion please 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 05:34 AM
For asking ServiceNow-related questions try this :
For a good and optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER