Prevent records being deleted from sysapproval_approver table

Preethi Malligo
Giga Expert

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.

1 ACCEPTED SOLUTION

vinothkumar
Tera Guru

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);

View solution in original post

5 REPLIES 5

Swapnil Soni1
Giga Guru

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