Remove a Custom Table Data from Update Sets (unextend Application File (sys_metadata))?

joshgrochowski
Mega Contributor

When developing a few custom tables, I selected the "Track in Update Sets" option thinking this option had to be selected to track schema changes in the tables (add/remove/rename columns, etc). We pushed an update set to our testing instance today and I noticed the data from the custom tables was also transferred over in the Update Sets. Looking more into this, by selecing the "Track in Update Sets" option, the tables now extend Application File (sys_metadata).

Is there a way I can remove the "Track in Update Sets" from the tables? Or, in otherwords - unextend the custom tables from sys_metadata? If its not possible to break the connection to sys_metadata, is it possible to configure all update sets to ignore any changes to the custom tables?

Thanks for the assistance!

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Josh,



Here is the script that you can run from background script to remove the value from "Extends table"


updateTableChanges();


function updateTableChanges()


{


  var gr = new GlideRecord('sys_db_object');


  gr.addQuery('sys_id','0799e3554f606a00bbc32d118110c77b'); //Replace sys_id with the exact table record


  gr.query();


  while(gr.next())


  {


  gr.super_class = '';


  gr.setWorkflow(false);


  gr.update();


  }


}



Please create a test table and then try this on dev first to make sure everything is working fine. Once you are done with the testing then you can try this with the table you have created.


Background Scripts — ServiceNow Elite


View solution in original post

6 REPLIES 6

Great Info. @Lane


dmitriy_apunevi
Kilo Contributor

Hi all!


Removing update_synch=true attribute in Collection record for custom table in Dictionary worked for me. Jakarta, patch 4.