Problem after wrongly deleting and restoring a custom table

Elder Louzada A
Tera Contributor

I'm experiencing something quite weird. I recently deleted a custom table, I didn't supposed to do this so I reverted this by going to sys_metadata_delete table, selecting the record related to the deletion and then clicking in Restore File button. Everything was working just fine, the table got back and I thought the problem was solved, though after a few hours the table just disappeared again. What makes things even more weird is the fact that the table is still being shown when I try to locate it via Studio, though it's label field value is now appearing as "label" instead of the name it used to have, also when I click in "Show List" related link it redirects me to a "page not found" page. Do you guys have any idea on how to solve this annoying problem?

4 REPLIES 4

4b0d3
Giga Guru

What happens if you just type the tablename    .list in the filter,   or tablename_list.do?  Studio doesn't always update immediately.  Maybe logging out of everything and back in may refresh it all.

When I do this .list in the filter it just redirects me to a "page not found", I do can see the table definitions though. Even logging out doesn't seem to solve the problem

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Elder Louzada A ,

 

Hope you are doing fine.

It's possible that when you restored the custom table from the sys_metadata_delete table, some related records or dependencies were not restored properly. This could be causing the table to disappear again.

To resolve this issue, you can try the following steps:

  1. Check the sys_metadata_delete table to see if there are any related records that were not restored properly. You can use the filter conditions "sys_class_name=table" and "name=<name of the custom table>" to find the relevant records.

  2. If there are any related records in the sys_metadata_delete table, restore them using the "Restore File" button.

  3. Check if there are any related records in other tables that were not restored properly. For example, if the custom table had a reference field to another table, check if the reference field still exists and is pointing to the correct table.

  4. If necessary, recreate the custom table from scratch. This may involve recreating any related records or dependencies as well.

  5. If the issue persists, you can open a support ticket with ServiceNow to get further assistance.

It's important to note that restoring records from the sys_metadata_delete table should be done with caution as it can have unintended consequences. It's always recommended to backup your ServiceNow instance before making any changes.

 

Please Mark My Response as Correct/Helpful based on Impact

 

Regards,

Amit Gujarathi


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi