---
title: "Codeunit 3915 Reten. Pol. Filtering Impl., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/points/
object: https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-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 3915 Reten. Pol. Filtering Impl., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/points/

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

## HasReadPermission

[Line 26](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L26).

- [32](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L32) calls [Codeunit 3917 Record Reference](https://jonas-paprotka.de/ref/codeunit/3917-record-reference/) `Initialize`

## ApplyRetentionPolicyAllRecordFilters

[Line 41](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L41).

- [50](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L50) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogWarning`
- [50](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L50) calls `LogCategory`
- [54](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L54) calls `CalculateExpirationDate`
- [55](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L55) calls `Yesterday`
- [56](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L56) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogWarning`
- [56](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L56) calls `LogCategory`
- [59](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L59) calls `ValidateExpirationDate`
- [60](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L60) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogInfo`
- [60](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L60) calls `LogCategory`
- [63](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L63) calls [Codeunit 3917 Record Reference](https://jonas-paprotka.de/ref/codeunit/3917-record-reference/) `Initialize`
- [64](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L64) calls [Codeunit 3910 Apply Retention Policy](https://jonas-paprotka.de/ref/codeunit/3910-apply-retention-policy/) `SetWhereOlderExpirationDateFilter`
- [67](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L67) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogInfo`
- [67](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L67) calls `LogCategory`

## ApplyRetentionPolicySubSetFilters

[Line 71](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L71).

- [84](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L84) calls [Codeunit 3917 Record Reference](https://jonas-paprotka.de/ref/codeunit/3917-record-reference/) `Initialize`
- [93](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L93) calls [Table 3902 Retention Policy Setup Line](https://jonas-paprotka.de/ref/table/3902-retention-policy-setup-line/) `GetTableFilterView`
- [96](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L96) calls `GetYoungestExpirationDate`
- [97](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L97) calls `Yesterday`
- [98](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L98) calls `Yesterday`
- [99](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L99) calls `GetOldestRecordDate`
- [106](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L106) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogInfo`
- [106](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L106) calls `LogCategory`
- [115](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L115) calls `MarkRecordRefWithRecordsToDelete`
- [117](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L117) calls `UnMarkRecordRefWithRecordsToKeep`
- [121](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L121) calls [Codeunit 3904 Apply Retention Policy Impl.](https://jonas-paprotka.de/ref/codeunit/3904-apply-retention-policy-impl/) `MaxNumberOfRecordsToDelete`
- [133](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L133) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogInfo`
- [133](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L133) calls `LogCategory`

## GetYoungestExpirationDate

[Line 137](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L137), local.

- [148](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L148) calls `CalculateExpirationDate`

## ValidateExpirationDate

[Line 204](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L204), local.

- [212](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L212) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `CalcMinimumExpirationDate`
- [214](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L214) calls [Codeunit 3908 Retention Policy Log](https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/) `LogError`
- [214](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L214) calls `LogCategory`
- [214](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L214) calls [Codeunit 3905 Reten. Pol. Allowed Tables](https://jonas-paprotka.de/ref/codeunit/3905-reten-pol-allowed-tables/) `GetMandatoryMinimumRetentionDays`

## MarkRecordRefWithRecordsToDelete

[Line 217](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L217), local.

- [219](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L219) calls `SetMarksOnRecordRef`

## UnMarkRecordRefWithRecordsToKeep

[Line 222](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L222), local.

- [224](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L224) calls `SetMarksOnRecordRef`

## SetMarksOnRecordRef

[Line 227](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L227), local.

- [240](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L240) calls `CalculateExpirationDate`
- [242](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L242) calls `ValidateExpirationDate`
- [245](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L245) calls `SetRetentionPolicyLineTableFilter`
- [248](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L248) calls `Yesterday`
- [251](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L251) calls [Codeunit 3910 Apply Retention Policy](https://jonas-paprotka.de/ref/codeunit/3910-apply-retention-policy/) `SetSingleDateExpirationDateFilter`
- [252](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L252) calls `SetMarks`
- [254](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L254) calls `Yesterday`
- [256](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L256) calls `Yesterday`
- [258](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L258) calls [Codeunit 3910 Apply Retention Policy](https://jonas-paprotka.de/ref/codeunit/3910-apply-retention-policy/) `SetWhereNewerExpirationDateFilter`
- [259](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L259) calls `SetMarks`
- [262](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L262) calls `ClearFilterGroupOnRecRef`
- [263](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L263) calls `ClearFilterGroupOnRecRef`

## SetMarks

[Line 267](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L267), local.

- [272](https://jonas-paprotka.de/ref/codeunit/3915-reten-pol-filtering-impl/source/#L272) calls `SetSelectedSystemId`

## Source

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

JOP-AL, 2026-11-20.
