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

How to change the parent of a table in scoped applications

verdakosnett
Tera Expert

There is a script (see below) that changes the parents of global application tables but it doesn't work on scoped apps where one could need this function even more. Why would they deny this capability to scoped apps? Hard to understand unless of course there is another solution   that I am not aware of. Any suggestions?

//Replace <source_table> with the table you want to extend

//Replace <table_extension> with the table you want to extend to, like cmdb_ci or task

var table = '<source_table>';

var old_parent = '';

var new_parent = '<table_extension>';  

var changer = new GlideTableParentChange(table);

changer.change(old_parent, new_parent);

4 REPLIES 4

denisetaylor68
Giga Contributor

Create as a global fix script and run in the global scope against your scoped tables.   We just did it on some of our internal scoped tables and it worked great!


Was it the same script or different? 

denisetaylor68
Giga Contributor

Hi Verda, I think I just replied to your other post on this.



The solution is to create a fix script in the global scope and run it in global against your scoped tables.   We just did it for one of our internal custom applications and it worked as expected.


Thanks Denise. After multiple years of designing ServiceNow tables, I have decided it is best not to change the inheritance after a table is created. The update sets do not include script-made changes.