- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 03:38 AM
For a customized form, there are a series of approvers. When each one of the approvers are approving the record, their entries in sysapproval_approver table are getting deleted and stored in the sys_audit_delete table by the system automatically. Is there any way to prevent the deletion as I want the records in future.
Thanks in advance,
Preethi M.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 03:54 AM
Create a delete operation on Approval table and set answer = false; which will prevent the deletion of record in your instance.
You can also create before delete business rule on approval table and use current.setAbortAction(true);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 04:39 AM
Hey Preethi,
You could write a before delete the business rule that queries associated tables to see if there is are records referencing current and then do a setAbortAction(true) if so.
And for more info you can go through this link
https://hi.service-now.com/kb_view.do?sysparm_article=KB0677278
Please mark correct or helpful if this helps.
Thanks
Swapnil