delete archived records based on the closing date

sergiofeito
Tera Contributor

I have a requirement to delete archived data that meets the condition of a closure date > 7 years old.

I've reviewed the Destroy Rules, but they only allow archived records to be deleted after they've been archived for a certain amount of time. Unfortunately, this doesn't work for me, so I'll explain below:

1. We started using Servicenow in January 2019.
2. We started archiving data in May 2022, and we archived data with a closure date older than 2 years.

For a couple of months, all records closed in 2019 and 2020 were archived. Therefore, the date those records were archived corresponds to 2022. Therefore, the closure and archive dates are out of sync, and we can't delete that data using the archive date.

How could I delete the archived data based on the closure date and not the archive date?

Any ideas are welcome.
Thank you very much!

2 REPLIES 2

Astik Thombare
Tera Sage

Hi @sergiofeito,

 

You can use Data Management Delete Jobs to remove records efficiently. Simply select the target table and define the appropriate filter conditions — the job will delete records based on those criteria.

 

For more info -  https://www.servicenow.com/docs/bundle/yokohama-platform-administration/page/administer/managing-dat...

 

If my answer helped you, please consider marking it as Correct and giving it a 👍 Helpful — it might help other members in the community too!

Thanks,
Astik T 😊💡

sergiofeito
Tera Contributor

Hi Astik,

thank you so much for your response.

Although "Data Management Delete Jobs" can be very useful for deleting data from various tables, it will not be useful for deleting archived data because its storage structure is different from that of normal tables.

regards