Retention Policies
Document Archive is integrated in the Retention Policies of Business Central.
See Retention Policies in Business Central
This article describes how administrators can define retention policies to specify how often to delete outdated data in tables that contain log entries and archived records. For example, cleaning up log entries can make it easier to work with the more relevant data. Policies can delete data based on an expiration date, or you can add filters to include only certain expired data.
You can add the Document Archive files to the Retention Policies by creating a new Retention Policy and set it up for Table Id = 70257124 (Document Archive Remote File Link)
When a record is deleted the Document Archive File Link in Business Central is deleted and also the file stored on the file handler.
Tip
You can also set up a Retention Period per Document Archive Category
Retention Policy Setup example