Saving Customizations in a Single XML File

guy_yedwab
Kilo Guru

Hi everyone,

I came up with a cute strategy to save a series of customizations into a single XML file, and several people around the office told me that it seemed pretty helpful, so I'm posting it here.

Why use this method?
-Save your customizations locally so that a clone, wipe, z-boot, etc. can happen without ruining your customizations.
-Share customizations with other users without having to leave your customization as an update set on your instance forever.
-Create a customization package people can download to their own instance.
-Email customizations to one another, or attach them to forum posts

Alright, here goes.

PART ONE: CREATING AN UPDATE XML
1) Create an update set containing your customizations, and once it's done mark it as Completed
2) Set up a data source in your instance pointing at itself (copy-paste your own url into the data source url).
3) Click Retrieve Completed Update Sets.
4) Go to System Update Sets > Retrieved Update Sets
5) Select your update set, and export to "XML (all)"

Congradulations! You now have a single XML file that has all of the customizations in a single file.

PART TWO: USING THE UPDATE XML
1) Go to System Update Sets > Retrieved Update Sets
2) Import the XML that you've exported using the above method
3) Click Commit Update Set.

Congrats! In three easy steps, you've applied your customizations from a file you saved locally.

Let me know how it works for you!

10 REPLIES 10

It looks like the "Export > XML (All)" may have been removed with the latest stable release. I don't see the option on the demo instance.


Ah, yes, you're right Mark. I was able to restore it to my instance by adding back the code to my UI Macro, but considering how that UI Action is dangerous on some tables, I'm not surprised that someone decided to get rid of it.


jerome_lambercy
Mega Contributor

I got the confirmation this functionality has been removed from the system.

Using your advice, I went to the corresponding UI macro --> context_form_header, and added the missing line under the standard XML export.

mExport.addURL("${gs.getMessage('XML (All)')}", "${ref}.do?UNL$[AND]sysparm_query=sys_id=$[${ref}.sys_id]$[AND]sysparm_unload_related=true");

But this seem not to work anymore, my XML output is missing related customer customization. Looks like the sysparm_unload_related param has been disabled. Any idea ?

I guess we will have to create our own script for that.


Hi Jerome,

Yeah, I discovered the same thing myself -- when I tested it, I neglected to actually look at the output XML and confirm that it really had done XML ALL. The developer was very thorough in removing the function.

However, yesterday I sat down with another developer and we created a pretty advanced customization to accomplish the same method, based on the original source-code that's now gone, but that avoids the original issues with XML ALL (which works great on our table, but on almost any other can accidentally take down the instance!). We've been asked to put it through a little more testing before we give it to customers, but once we've assured that it's not catastrophic to anyone's system, I can give you an update set with the customization, which will actually probably become part of the product in the next Stable.

I'll keep you updated. Thanks for alerting us to the missing functionality.


Hi Jerome,

I worked with a couple developers on our end and Winter 2010 will include UI actions to allow you to export an update set to XML directly from the Local Update Sets form.

For more information, visit the newly updated wiki:

http://wiki.service-now.com/index.php?title=Saving_Customizations_in_a_Single_XML_File

It's even easier than the old method.

Guy Yedwab
Documentation