_ubho
Kilo Contributor

Hi All,

 

Today I encountered a severe issue in which we had created a table but forgot to extend the task table. As most you are aware that the group approvals can only work on tables extended by task tables. So it was a utmost problem for us and the only solution was to re-create the table. Not only is this a huge amount of work but also its a tedious job. So with the help of google and a little hilly-dilly here and there I found a way to achieve this with a minimalistic effort. This code might help you in this case. All thanks to ServiceNow Elite.

 

Please find the code below:-

 

var table = 'u_test'; // your custom table
var v_OldParent = ''; 
var v_NewParent = 'task'; // the table you want to extend

var changer = new GlideTableParentChange(table);
changer.change(v_OldParent,v_NewParent);

Hope this helps.
Comments
rutuja6
Tera Contributor

Hi @_ubho ,

This code doesn't work in scoped application, do you have any other workaround for this?

 

Thanks,

Rutuja

Version history
Last update:
‎11-30-2018 01:04 AM
Updated by: