Processing XML Import via Script?

Gajendra Singh1
ServiceNow Employee

Is there a way to process an XML import file via script rather than GUI? Instead of going to "Import XML" have a script that pulls the file by location or content and processes it? 

5 REPLIES 5

Vikrant Vashish
Tera Contributor

 

Hi @Gajendra Singh1 ,

Please check this functionality developed and shared on developer site:


https://developer.servicenow.com/connect.do#!/share/contents/8667315_bulk_upload_xmls?v=1.0&t=PRODUC...

 

In this OOTB function is used to import bulk XMLs from the XML content of the attachments.

 var updateManager = new GlideUpdateManager2();
 updateManager.loadXML(xmlFromAttachment);
 
These functions you can use to import XML Strings into your instance via a scripted api.

 

Thanks!

Vikrant