---
title: "Table 3901 Retention Policy Setup, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/points/
object: https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Table 3901 Retention Policy Setup, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/points/

7 procedures and triggers with a step in src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetup.Table.al, in source order, read from the text, not from a run.

## Table Id.OnValidate

[Line 27](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L27), trigger.

- [31](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L31) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `IsAllowedTable`
- [32](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L32) validates [Table 3901 Retention Policy Setup](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/) `Date Field No.`
- [32](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L32) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `GetDefaultDateFieldNo`

## Table Id.OnLookup

[Line 35](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L35), trigger.

- [39](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L39) validates [Table 3901 Retention Policy Setup](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/) `Table Id`
- [39](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L39) calls [Codeunit 3902 Retention Policy Setup](https://jonas-paprotka.de/ref/codeunit/3902-retention-policy-setup/) `TableIdLookup`

## Table Name.OnLookup

[Line 48](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L48), trigger.

- [52](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L52) validates [Table 3901 Retention Policy Setup](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/) `Table Id`
- [52](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L52) calls [Codeunit 3902 Retention Policy Setup](https://jonas-paprotka.de/ref/codeunit/3902-retention-policy-setup/) `TableIdLookup`

## Retention Period.OnValidate

[Line 67](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L67), trigger.

- [71](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L71) calls [Codeunit 3903 Retention Policy Setup Impl.](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/) `ValidateRetentionPeriod`
- [73](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L73) validates [Table 3901 Retention Policy Setup](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/) `Enabled`

## Apply to all records.OnValidate

[Line 99](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L99), trigger.

- [109](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L109) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [109](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L109) calls `LogCategory`

## Date Field No..OnLookup

[Line 128](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L128), trigger.

- [132](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L132) validates [Table 3901 Retention Policy Setup](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/) `Date Field No.`
- [132](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L132) calls [Codeunit 3902 Retention Policy Setup](https://jonas-paprotka.de/ref/codeunit/3902-retention-policy-setup/) `DateFieldNoLookup`

## OnDelete

[Line 171](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L171), trigger.

- [175](https://jonas-paprotka.de/ref/table/3901-retention-policy-setup/source/#L175) calls [Codeunit 3903 Retention Policy Setup Impl.](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/) `DeleteRetentionPolicySetup`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
