Why is my custom table losing all of it's data?

asanderford
Kilo Contributor

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. 

5 REPLIES 5

Tony Chatfield1
Kilo Patron

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

 

John Zhang1
Kilo Patron
Kilo Patron

 

Please go "Deleted Records" to find the deleted records. 

find_real_file.png

 You can open the deleted record and then do following two things:

1) Recovery the record by clicking "Undelete With Related" button

find_real_file.png

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.

 

 

 

 

 

 

Hitoshi Ozawa
Giga Sage
Giga Sage

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.

 

Anil Lande
Kilo Patron

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.

 

find_real_file.png

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande