Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to restore multiple archived incidents

chandana16
Tera Contributor

Hello All,

 

I want to restore some 15 k incidents from archive table.

can you please give a suggestions.

Thank you.

14 REPLIES 14

@karan: i have used the same script syntax as you provided i just given our incident number sysID in sysid.

@chandana16  - use archive table record's sys id, not the incident's, example:

new GlideArchiveRestore().restore('abf234354r2.....');

 

@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

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 🙂

sourav1999
Mega Guru
• Restoring multiple archived incidents can be done using the ServiceNow “Restore” feature. • This feature can be accessed by navigating to the incident table in the ServiceNow instance. • Select the incidents that need to be restored, and then click the “Restore” button. • The incidents will be restored to their original state.
 

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