Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Best way to capture custom table records in current Update Set in ServiceNow?

neerajydv11
Kilo Contributor

Hi everyone,

I am working on a custom table (u_capture_record_table) in ServiceNow and I have created multiple records in it.

As per my understanding, Update Sets capture configuration changes but not data records. However, I have a requirement to capture or move these table records within the current Update Set.

I have already tried:

  • Add to Update Set option (not available for my table)

  • Fix Script (it captures the script, not the records directly)

  • XML export/import (works for data migration but not with Update Sets)

My questions are:

  1. Is there any way to directly capture table records in the current Update Set?

  2. Is using Fix Script the only recommended approach for this scenario?

  3. What is the best practice in real-time projects for moving such data?

Any suggestions or best practices would be really helpful.

Thanks in advance.

2 REPLIES 2

lochuynh33
Tera Expert

Hello @neerajydv11 ,

Please try importing this button into your instance. Once imported, you will be able to capture records into your Update Set.

You can access the utility here:
https://developer.servicenow.com/connect.do#!/share/contents/9824957_add_to_update_set_utility?v=9.2...

If this response was helpful, please consider marking it as Correct and Helpful. You may mark more than one reply as an accepted solution.

Ankur Bawiskar
Tera Patron

@neerajydv11 

You can use this script in background and capture those records in your update set

var gr = new GlideRecord('your table');
gr.addQuery('sys_id', 'IN', 'sysId1,sysId2');
gr.query();
while (gr.next()) {
    var gum = new GlideUpdateManager2();
    gum.saveRecord(gr);
}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader