Why am I unable to delete certain records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-05-2022 02:01 PM
Under the "core_company" table, I have two records which are unable to be deleted. When deleting via the delete button, it simply does nothing and the records are still there. When attempting to delete via script, I get this
I've also tried this
gs.sql("DELETE FROM core_company WHERE sys_id='09c978f91b02c95080de1133b24bcba8'");
The only thing I am seeing in the debugger is this.
GlideRecord newGlideRecord() called with invalid table name: Company

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-05-2022 04:14 PM
Hello Tyler,
Please try the below script.
var compGr = new GlideRecord('core_company');
compGr.addQuery('sys_id','09c978f91b02c95080de1133b24bcba8');
compGr.query();
if(compGr.next())
{
compGr.setWorkFlow(false);
compGr.deleteRecord();
}
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-06-2022 08:59 AM
Hello, Pradeep.
We tried running the script but I think the record is not deleting because the record is acting as a "ghost" record. When I query it, it does show up. It also shows on the list view but when you actually open up the record it says "page not found".
And also, I found there are one more duplicate record at the same time.
but they have two different sys_id.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-06-2022 08:37 PM
Hi Chang,
Maybe it's in the cache. Enter cache.do to flush the cache and see if the record still shows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-07-2022 05:57 AM
Unfortunately, it still does show up. I cleared the cache multiple times, just in case.