Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Process XML Import via Script?

pfeifn
Kilo Expert

Is there an out of box 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? )

Thanks!

1 ACCEPTED SOLUTION

No good global solution was found unfortunately. You could probably get away with doing it for 1 or a handful of tables if you are really careful, but it is probably not worth it in that regard. 

I checked with SN and they said the actual import process cannot be called via script. Disappointing, hopefully one day "releases" into service-now will be able to be automated! 

View solution in original post

10 REPLIES 10

Vikrant Vashish
Tera Contributor

Hi @pfeifn ,

Please check the similar 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);

 

Thanks!

Vikrant