---
title: "Codeunit 3903 Retention Policy Setup Impl., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/points/
object: https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/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/"
---

# Codeunit 3903 Retention Policy Setup Impl., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/points/

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

## SetTableFilterView

[Line 35](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L35).

- [42](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L42) calls `GetTableFilterView`
- [55](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L55) calls `ConvertFilterViewToFilterText`

## GetTableFilterView

[Line 66](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L66).

- [72](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L72) calls `CalcTableFilterBlob`

## GetTableFilterText

[Line 79](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L79).

- [81](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L81) calls `ConvertFilterViewToFilterText`
- [81](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L81) calls `GetTableFilterView`

## TableIdLookup

[Line 103](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L103).

- [110](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L110) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `GetAllowedTables`
- [125](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L125) calls `GetUsedTablesFilter`
- [127](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L127) runs [Page 358 Objects](https://jonas-paprotka.de/ref/page/358-objects/)

## TableExists

[Line 150](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L150).

- [158](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L158) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogWarning`
- [158](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L158) calls `LogCategory`

## DateFieldNoLookup

[Line 161](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L161).

- [172](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L172) calls [Codeunit 9806 Field Selection](https://jonas-paprotka.de/ref/codeunit/9806-field-selection/) `Open`

## ValidateRetentionPeriod

[Line 210](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L210), local.

- [222](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L222) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `CalcMinimumExpirationDate`
- [224](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L224) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [224](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L224) calls `LogCategory`
- [224](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L224) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `GetMandatoryMinimumRetentionDays`

## VerifyRetentionPolicySetupOnbeforeDeleteRetentionPeriod

[Line 234](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L234).

- [248](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L248) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [248](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L248) calls `LogCategory`
- [252](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L252) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [252](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L252) calls `LogCategory`

## VerifyRetentionPolicySetupOnBeforeModifyRetentionPeriod

[Line 255](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L255).

- [269](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L269) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [269](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L269) calls `LogCategory`

## VerifyRetentionPolicyAllowedTablesOnBeforeInsertRetenPolSetup

[Line 272](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L272).

- [283](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L283) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `IsAllowedTable`
- [284](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L284) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [284](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L284) calls `LogCategory`
- [285](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L285) calls [Codeunit 3906 Reten. Pol. Allowed Tbl. Impl.](https://jonas-paprotka.de/ref/codeunit/3906-reten-pol-allowed-tbl-impl/) `GetTableFilters`

## InsertDefaultTableFiltersOnAfterInsertRetenPolSetup

[Line 290](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L290).

- [311](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L311) calls [Codeunit 3906 Reten. Pol. Allowed Tbl. Impl.](https://jonas-paprotka.de/ref/codeunit/3906-reten-pol-allowed-tbl-impl/) `GetTableFilters`
- [316](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L316) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Table ID`
- [323](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L323) calls [Codeunit 3906 Reten. Pol. Allowed Tbl. Impl.](https://jonas-paprotka.de/ref/codeunit/3906-reten-pol-allowed-tbl-impl/) `ParseTableFilter`
- [325](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L325) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogWarning`
- [325](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L325) calls `LogCategory`
- [327](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L327) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Table ID`
- [328](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L328) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Retention Period`
- [328](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L328) calls `FindOrCreateRetentionPeriod`
- [329](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L329) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Date Field No.`
- [330](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L330) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Locked`
- [331](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L331) calls [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `IsLocked`
- [332](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L332) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Enabled`
- [334](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L334) validates [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `Enabled`
- [337](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L337) calls [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `GetTableFilterText`
- [338](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L338) writes [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) Insert(true)

## FindOrCreateRetentionPeriod

[Line 356](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L356).

- [369](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L369) calls `CreateUniqueRetentionPeriodCode`
- [373](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L373) validates [Table 3900 Retention Period](https://jonas-paprotka.de/ref/table/3900-retention-period/) `Retention Period`
- [375](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L375) validates [Table 3900 Retention Period](https://jonas-paprotka.de/ref/table/3900-retention-period/) `Ret. Period Calculation`
- [376](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L376) writes [Table 3900 Retention Period](https://jonas-paprotka.de/ref/table/3900-retention-period/) Insert(true)

## DeleteRetentionPolicySetup

[Line 393](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L393).

- [402](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L402) calls [Codeunit 3903 Retention Policy Setup Impl.](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/) `AddTableIdToDeleteAllowedList`
- [403](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L403) writes [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) DeleteAll(true)

## NotifyOnMissingReadPermission

[Line 414](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L414).

- [421](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L421) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `GetRetenPolFiltering`

## CheckRecordLockedOnRetentionPolicySetupLine

[Line 451](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L451).

- [459](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L459) calls [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `IsLocked`
- [461](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L461) raises `OnVerifyDeleteAllowed`
- [463](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L463) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogInfo`
- [463](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L463) calls `LogCategory`
- [466](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L466) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [466](https://jonas-paprotka.de/ref/codeunit/3903-retention-policy-setup-impl/source/#L466) calls `LogCategory`

## Source

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

JOP-AL, 2026-11-20.
