removing extends after table is created

Deepika54
Tera Contributor

Hello Experts,

I have created a table which is getting extended from cmdb_ci table. The table is created. Now the business user is telling me that the table shouldn't be extended from cmdb_ci. is there a way to remove the extends from the table after the table is created or do i have to create it from scratch? 

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Deepika54 ,

That is not a good practice to remove the field value especially for 'sys_db_object' table.

But if you want then you can use below script in Script - Background.

Before running that script you will have to disable One business rule for temporary purpose. BR name :--> "Table Field Validation"

var gr=new GlideRecord('sys_db_object');
gr.get('9cdcbfa82f29a5101a5cf3ecf699b6e5'); //Table Sys ID
gr.super_class='';
gr.update();

Note : The fields extended from that table will not get removed.


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Anurag Tripathi
Mega Patron
Mega Patron

My two cents, It is better you create a new Table and delete the one where you want to remove the extends from.

-Anurag