Archived data deletion policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 03:57 AM
Hello Everyone,
We wanted to delete the Archived records of Request, RITM and related records on basis of some configurations, which are stored in different table. For example: we have one table where we have different delete duration for different item.
Now the problem is we cannot use OOTB destroy rule because it doesn't have any condition fields and also, we cannot use table cleaner, because even if we delete the archived Request, RITM we could not delete the references like archived variables, audit, etc because archived table doesn't have references.
We have some custom solutions to achieve this requirement but I have following questions.
1. Has anyone implemented something like this before?
2. Is there any best possible way to achieve this requirement?
Thank you in advance!!
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 08:27 PM - edited 05-30-2024 12:52 AM
Hi Vandna,
Please find the solution below for your requirement. You will need to write a script to destroy the archived request data.
Script Include / Background Script:
- You can write either a Script Include or a Background Script to perform the necessary actions.
Query the "sys_archive_log" Table:
- Query the "sys_archive_log" table and check for the table name "sc_request". You will find archive records for "sc_request" in this table.
Reference Field "ID":
- In the "sys_archive_log" table, there is a reference field called "ID" which will give you the request number. You can use dot-walking to find the request item name from this reference field as below screen short
Query the "ar_sc_request" Table:
- Once you have the request item name, you can query the "ar_sc_request" table. Here, you can loop and find-out those request number , and you can destroy the record based on the "created on" or "closed on" fields.
If you need further assistance or have any questions, please let me know.