← All guides

Data Retention Policies: Automated Cleanup That Respects the Audit Trail

Administration & Upgrades · 6 min read · By Dex Carter · Published 2026-10-26 · Last updated 2026-10-26

Archive shelves with cardboard record boxes, several shelf spaces empty, and a plain wall clock above
Kept on a schedule: some boxes stay, the expired ones are gone.

Which records in your Business Central database would you let a machine delete overnight, permanently, with nobody watching? That is not a rhetorical question. It is the exact decision a retention policy asks an administrator to make, and a retail database is the wrong place to make it casually: the same system that holds disposable log entries also holds the records a retailer may need to produce later. This runbook works in a deliberate order — draw the audit line first, enrol only the documented tables, filter before you schedule, and prove the first runs deleted what you expected.

What a retention policy actually deletes

Administrators define retention policies to specify how frequently Business Central deletes outdated data in tables containing log entries and archived records. The policies can automatically delete expired records from supported tables, including selected system logs, archived records, and eligible tables added by extensions. Used that way, retention policies support an organisation’s data retention and records-management requirements and reduce database clutter.

Two required setups decide everything. Allowed Tables is the whitelist: Microsoft provides a list of tables a policy may touch, and extension tables are added to that list by a developer. Retention Periods determine how often data is deleted. A table that is not on the allowed list is outside the policy’s reach, which is why the audit conversation starts with the whitelist and not with the delete schedule.

The audit line: decide what the policy must never touch

The product documentation describes mechanics: which tables, which periods, which filters. It does not draw the retailer’s audit line, and neither does this article — no source in the research behind it sets a statutory retention period for retail or tax records, so any specific legal period has to come from your own accountant and obligations, not from a setup page. What an admin can do is classify the candidate tables before any period is set:

CandidateDocumented statusRetail decision
System log entriesNamed in the documentation as a retention-policy table typeFirst candidate: high volume, low long-term value once the period passes
Archived recordsNamed alongside log entries as the tables policies are built forCandidate, after confirming the archive is not the only copy anyone consults
Change log and audit-adjacent tablesEligibility depends on the allowed list in your tenantJudgement call: weigh deletion against the table’s value as evidence of who changed what
Records the business must produce laterOutside the documented log/archive scopeDefault answer is no policy until the retention obligation is confirmed in writing

That last row is the audit trail doing its job. A retention policy deletes permanently and on schedule; a record that finance, an auditor, or a tax review may ask for does not become deletable just because it is old.

The mechanics: periods, filters, and the job queue

Business Central includes a standard set of tables that can be configured for automatic deletion. Setup happens on the Retention Policies list: select the table, define the retention period, and enable the policy — enabling a policy activates its job queue entries, which is what makes the deletion run on schedule rather than as a one-off cleanup.

A policy does not have to take the whole table. It can apply to filtered subsets of a table’s data rather than all records, so a policy can target the oldest, narrowest slice first — one category of log, one date band — instead of everything the table holds. Filters are the throttle on a tool whose results cannot be undone.

LS Central tables: the developer step nobody budgets for

Here is the limit admin-facing guides underplay. Adding tables from other apps to a retention policy is not an admin action: it requires a developer codeunit, deployed as an install or upgrade, and the tables must belong to the same app in which the codeunit is created. Extension tables reach the allowed list through a developer, the same way.

For an LS Central retailer that has a practical consequence. The standard Business Central tables are available to configure today; the retail app’s own tables join a policy only after partner or developer work. No source behind this article inventories which LS tables partners typically register, so scope that question into the partner conversation before promising anyone a cleanup date for retail log tables.

Rollout runbook: filter, test, enable, verify

  1. Start from the allowed list. Open Allowed Tables and work only from what is listed there. If a table you expected is absent, that is the developer conversation above, not a setup workaround.
  2. Mark the audit line on paper. For each candidate table, record the decision from the classification above — candidate, judgement call, or out of scope — and who made it, before any period is entered.
  3. Enrol one table. On the Retention Policies list, select a single log or archive table and define its retention period.
  4. Filter narrow. Where the table holds mixed data, scope the policy to a filtered subset rather than all records, so the first runs touch the smallest defensible slice.
  5. Record the “before” numbers. Note the table’s record count and its oldest record dates. Without a before picture, the first run cannot be verified.
  6. Enable the policy. Enabling activates the policy’s job queue entries; confirm those entries exist and are scheduled as expected.
  7. Verify the first runs. After the first scheduled runs, compare counts and oldest dates against the before picture: the records past the period should be gone, and records inside the period should still be there.
  8. Repeat per table. Add the next table only after the previous one has verified cleanly. One table at a time keeps a wrong period from becoming a fleet-wide deletion.

What success looks like: after the first runs, the enrolled table’s oldest records match the retention period you set, nothing inside the period is missing, the job queue entries for the policy are running on schedule, and every table you classified as out of scope is untouched because it was never enrolled.

Review rhythm: periods are decisions, not settings

A retention period set once and forgotten is a deletion rule nobody owns. Revisit the enrolled tables when the business changes — a new store, a new app, a new reporting obligation — and whenever a table is newly registered on the allowed list by a developer, because registration is what makes it deletable. Keep the classification record from step 2 with the setup: the next admin should be able to see not just how long each table is kept, but who decided that was long enough.

, Dex Carter, Tech Writer

NextLedger entry compression and archiving →