logo

NJP

"Export to XML (NOT Complete)" Tool

Import · Oct 15, 2018 · article

Included in the Developer Toolbox Update Set available on Share (link to Share in the post).

I'm always having to export Update Sets that are not yet completed, either while preparing for a Clone, when sharing with someone, or when posting an article here in the Community. OOB, the "Export XML" UI Action only appears when the State is "Complete", so this one shows up when the State is NOT "Complete". It's based on the OOB one.

image

Here are the details of the UI Action:

Name: Export to XML (NOT Complete)

Table: Update Sets [sys_update_set]

Order: 100,000

Action name: u_fpc_export_to_xml_not_complete

Active: Checked

Show update: Checked

Form link: Checked

Hint: Download a "Retrieved Update Set" in XML format (FPC)

Condition: current.state != "complete"

Script:

(function() {
    var updateSetExport = new UpdateSetExport();
    var sysid = updateSetExport.exportUpdateSet(current);

    action.setRedirectURL("export_update_set.do?sysparm_sys_id=" + sysid + "&sysparm_delete_when_done=true");
})();

I've attached an XML file so you can just import it into your instance. As always, try it out in your company's development instance first, or better yet, your own personal development instance.

View original source

https://www.servicenow.com/community/developer-blog/quot-export-to-xml-not-complete-quot-tool/ba-p/2286286