The CreatorCon Call for Content is officially open! Get started here.

Capture Tables and Fields in update set

Mark Wood
Tera Contributor

Hello Experts,

I have created a table with multiple fields but I forgot to capture them in the update set. now I am trying to capture them using the below code but still am not able to capture them .can anyone please guide me how can I capture them in my new update set? or do I need to create another table with new fields to capture them in current update set.

please guide me thank you.

var gr=new GlideRecord('sys_db_object');
gr.addQuery('sys_id',"f7f8a3681b9e7910a72cfdd2cd4bcb09");
gr.query();
if(gr.next())
{
var um=new GlideUpdateManager2();
um.saveRecord(gr);
gs.print("record saved");



}
1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Mark,

You can try navigating to sys_update_xml table and then look for records and update the Update set name in which you want to capture records.

View solution in original post

7 REPLIES 7

@Mark Wood You need to load it from "Retrieved update sets" module. Click on "Import Update Set from XML" related link and load the xml.

 

SANDEEP28_0-1698913341167.png

 

After loading, search "Add to Update Set HR v1.2" update set name in Retrieved update set list. Previewed and the commit it.

 

SANDEEP28_1-1698913584881.png

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Prince Arora
Tera Sage

Hello @Mark Wood 

 

When you create a new table, it will generate a corresponding entry in the "sys_db_object" table and its columns, which are represented as dictionary entries in the "sys_dictionary" table, as illustrated below. You can incorporate a table filter and apply the same script mentioned earlier to retrieve the columns of the table.

 

 

PrinceArora_0-1698840602287.png

 

Subsequently, you will need to capture the form layout, list layouts, and ACLs associated with this table, as they are stored in separate tables. To collect the form layout, you can configure it once, and the system will automatically capture it. The same principle applies to list layouts.

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

 

 

 

 

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark Wood 

you didn't capture in update set, but those will be present in the default update set as customer updates

Simply visit customer updates table and then move those to your new update set

Ensure the scope is same

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