# Retention policies on Sales Header Archives

**URL:** <https://www.dynamicsuser.net/t/retention-policies-on-sales-header-archives/79114>\
**Category:** User Forum\
**Created:** [September 20, 2023, 11:48pm UTC](https://www.dynamicsuser.net/t/retention-policies-on-sales-header-archives/79114 "2023-09-20T23:48:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Steven](https://www.dynamicsuser.net/u/Steven)\
**Post date:** [September 20, 2023, 11:48pm UTC](https://www.dynamicsuser.net/t/retention-policies-on-sales-header-archives/79114/1 "2023-09-20T23:48:27Z")

</div>

Hi,

we have auto-archive enabled for our sales orders.  
I read that I can create a retention policy that deletes the older version a sales order archive while keeping the most current version.

When I set everything up, it’s not working because the default field it’s looking at doesn’t get populated on the auto-archive. I can’t change the default field.

Anyone has any idea on how to fix it? Do I need to code my own retention policy and change the date field?

Thank you in advance.

Actual retention policy

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/d/d4e123c26967b69c87e7aae9e99a2404b2f0cb73.png)

Actual value of that field for a sales order archive

![image](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/9/93a0ca7d55f4c93bc7d09c1c5dd8d144240b2d90.png)

---

<div class="post-metadata">

**Author:** ![Brendan\_Tripp](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Brendan\_Tripp](https://www.dynamicsuser.net/u/Brendan_Tripp)\
**Post date:** [April 14, 2024, 11:20pm UTC](https://www.dynamicsuser.net/t/retention-policies-on-sales-header-archives/79114/2 "2024-04-14T23:20:51Z")

</div>

Did you get any joy on this? I am also facing this same issue, where the date is blank and not able to complete the delete - not even able to count the records. I am unable to change the date field.
