How to change parent of a table?

Suresh Vemanna1
Kilo Contributor

Hello Experts,

I am trying to change the parent table of one table.

I have gone through few posts on community and found the below methods which can change the parent of a table. But it is always returning 'false' for me.

//var changer = new Packages.com.glide.db.table.TableParentChange('u_load_balancer');
//var g = changer.change('cmdb_ci_netgear','cmdb_ci_server');  
//gs.print(g);
 
var changer = new GlideTableParentChange('cmdb_ci_lb');
var g = changer.change('cmdb_ci_server','cmdb_ci_netgear');
gs.print(g);
 
I have found reParentTable() method from CMBDUtil API in the ServiceNow docs. But even this returned "false".
var gr = SNC.CMDBUtil.reParentTable('cmdb_ci_lb', 'cmdb_ci_server', 'cmdb_ci_netgear');
gs.print(gr);

I tried the same even for my custom tables, which I made sure that the tables are extensible. But still it didn't work.

I have elevated roles to 'security_admin' and tried, even this didn't work.

 

Has anyone tried changing the parent of a table?

Please note I do not want to create a new table to extend from the parent table I desire.

Please let me know the correct way to change the parent of a table.

 

Many thanks in advance.

Br,

Suresh

10 REPLIES 10

Sorry, I missed it. this is obvious Paul, doesn't want everyone to change OOB-defined hierarchies.