- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:04 PM
HI,
I was trying to create a Archival rule for alm_Hardware table, by mistake I have selected the cmdb_ci_ hardware table and saved the record.
I can see the tables were created with ar_cmdb_ci_ in sys_db_object_list.
i have tried to delete the tables created, but I could not able to see the Delete option. i have Provided screenshot below, Can someone help me on this ??
Thanks,
M
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:31 PM
Hi
Run this on Background and check whether its getting correct Table name or not.
Note: replace your sys_id of the table.
var grT= new GlideRecord('sys_db_object');
grT.addEncodedQuery('sys_id=e8f0c98b6d2620100acb70b35343309d');
grT.query();
if(grT.next()) {
gs.print('Table Name = ' + grT.label);
}
If its showing correct sys_id, then run this below script on Background.
var grT= new GlideRecord('sys_db_object');
grT.addEncodedQuery('sys_id=e8f0c98b6d2620100acb70b35343309d'); //Replace your table Sys_id
grT.query();
if(grT.next()) {
gs.print('Table Name = ' + grT.label);
grT.autoSysFields(false);
grT.setWorkflow(false);
grT.deleteRecord();
}
If my response is helpful, then Please mark as Correct Answer/Helpful.
Please check and let us know.
Thanks 🙂
Shakeel Shaik.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:07 PM
Hi manasa,
Once try to delete it from List view only.
If my response is helpful, then Please mark as Correct Answer/Helpful.
Please check and let us know.
Thanks 🙂
Shakeel Shaik.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 11:31 PM
Hi
Run this on Background and check whether its getting correct Table name or not.
Note: replace your sys_id of the table.
var grT= new GlideRecord('sys_db_object');
grT.addEncodedQuery('sys_id=e8f0c98b6d2620100acb70b35343309d');
grT.query();
if(grT.next()) {
gs.print('Table Name = ' + grT.label);
}
If its showing correct sys_id, then run this below script on Background.
var grT= new GlideRecord('sys_db_object');
grT.addEncodedQuery('sys_id=e8f0c98b6d2620100acb70b35343309d'); //Replace your table Sys_id
grT.query();
if(grT.next()) {
gs.print('Table Name = ' + grT.label);
grT.autoSysFields(false);
grT.setWorkflow(false);
grT.deleteRecord();
}
If my response is helpful, then Please mark as Correct Answer/Helpful.
Please check and let us know.
Thanks 🙂
Shakeel Shaik.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2022 01:05 AM
Hi
while deleting this, be careful, and check properly.
Shakeel Shaik 🙂