Why is my custom table losing all of it's data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 01:25 PM
I'm working on creating an application for our print shop to reprint and create print shop jobs. I have a table that holds all of the print job parameters so that a user can request the form at any point.
For some reason the table keeps losing all of it's data with no intervention from me and I can't figure out what would be clearing it. Any help would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 01:57 PM
Hi, I would be very very surprised if data in a table was being deleted without any intervention (intended or not), unfortunately with no clear details and no visibility of your environment diagnostics are not really possible.
I would suggest that you start by checking any of these that may be running against the table
business rules, workflow, scheduled jobs, table cleaning, archiving, script actions.
Table cleaner
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694151
Archive
https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/database-rotation/concept/c_ArchiveData.html
It is also possible that data is also being hidden by ACL's, a query business rule, or a default filter if navigating to the table via a menu module.
You can check ACL's via a security debug
https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/contextual-security/concept/c_AccessControlRulesDebug.html
QBR
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0523826
Menu Module
https://docs.servicenow.com/bundle/rome-platform-user-interface/page/administer/navigation-and-ui/task/t_CreateAModule.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 03:07 PM
Please go "Deleted Records" to find the deleted records.
You can open the deleted record and then do following two things:
1) Recovery the record by clicking "Undelete With Related" button
2) Look at "Payload" content to investigate why this record is deleted.
If my reply is Helpful/Correct, please mark the answer as Helpful/Correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 06:53 PM
Hi Asanderford,
Look at Audit Deleted Records (sys_audit_delete) to find who is deleting the records.
Check if there is any job or script that runs on the table to find all the places where records will be deleted.
Try creating a business rule to log activities on the table.
Many times, it's a misconfigured query condition in a script that the culprit. If the query condition is wrong, it will select all the records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 07:24 PM
Hi,
Please check Archive rules created for your table or any scheduled job or script logic written to delete records, applying wrong query in GlideRecord script can delete all records.
Thanks,
Anil Lande
Thanks
Anil Lande