Imported XML does not generate 'number' for Inserts

wipeout630
Mega Expert

I exported KBs (in XML) from one ServiceNow instance and imported to into another instance.   The import process worked perfectly with one exception:   KB numbers weren't created for the new inserts.   Is there a way to populate the KB numbers without recreating each of them?

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

If you're not concerned with what the previous numbers used to be, you can use this SNGuru solution to set the numbers as Brad suggests.



http://www.servicenowguru.com/scripting/numbering-existing-records/



If you need the numbers to be identical, then you'll probably have to set up a transform map of some sort and import them from the other system.


View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You could run a background script that queries all kb articles with a blank number field and use the getNextObjNumberPadded() function to set the number.


Mark Stanger
Giga Sage

If you're not concerned with what the previous numbers used to be, you can use this SNGuru solution to set the numbers as Brad suggests.



http://www.servicenowguru.com/scripting/numbering-existing-records/



If you need the numbers to be identical, then you'll probably have to set up a transform map of some sort and import them from the other system.


Worked like a charm.   Thanks!