logo

NJP

Deleting the undeletable record -

Import · Oct 04, 2018 · article

I recently had the misfortune to install an update set where the update failed. I followed up with a Back Out operation which also failed. One of the issues stemming from this was a record which could not be viewed or deleted. I investigated and found:

1. That the record was in a table that was created by the updated set involved.

2. The table extended another table ( u_cmdb_ci_app_service ). In other words, u_cmdb_ci_app_service was the parent of the table which was deleted.

3. The table was deleted in the Backout operation.

4. The part of the record which resided in the parent tables was not deleted. But the record's class still reflected the now non-existent table.

This became apparent when XML exports of the table failed for an invalid markup. It turns out that the record fragment was being exported, but there was no closing tag for the record. Attempts to view the record failed and no delete button appeared in the UI. Attempts to directly delete the record using a script also failed.

The Solution

-----------------

1. Locate the "highest table" in the record fragment's parentage which still exists2.. Attempt to view the record using the list view of the parent table. Extract the sys_id form the URL in the "not found" message.3. Run a script which updates the sys_class variable to the same value as the table just determined.

4. You can now view the record and delete it using the UI.

View original source

https://www.servicenow.com/community/developer-articles/deleting-the-undeletable-record/ta-p/2330286