---
id: object/codeunit/3906
type: object
title: Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl."
summary: Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl." in System Application (System.DataAdministration). 20 public procedures, 2 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC25, BC28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 9e27ff2a45b0b20b19277e955a460e9bc6d78193edcc159df40ba6f5b4f23c3b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Retention%20Policy/src/Retention%20Policy%20Allowed%20Tables/RetenPolAllowedTblImpl.Codeunit.al
    title: src/System Application/App/Retention Policy/src/Retention Policy Allowed Tables/RetenPolAllowedTblImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 3906
name: Reten. Pol. Allowed Tbl. Impl.
namespace: System.DataAdministration
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 34
  events: 2
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 2
  called_by: 3
  implements: 0
---

# Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl."

> Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl." in System Application (System.DataAdministration). 20 public procedures, 2 events, 2 event subscribers. Present since at least BC23, still in BC30, changed in BC25, BC28.

System Application · System.DataAdministration · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Retention%20Policy/src/Retention%20Policy%20Allowed%20Tables/RetenPolAllowedTblImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata AllObj = r, tabledata AllObjWithCaption = r, tabledata Field = r, tabledata "Published Application" = r, tabledata "Retention Policy Allowed Table" = rimd |

## Events published

- `OnVerifyAddtoAllowedList(TableId: Integer; var InsertAllowed: Boolean)` (internal): This is an internal event that only this module is allowed to subscribe to. It is raised by a subscriber to the OnBeforeInsertEvent of the Reten. Pol. Allowed Table table. The manual subscriber AllowAddtoAllowedList is bound just before the Insert() in procedure AddToAllowedTables. These elements co...
  - subscribers: [Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl."](../codeunit/3906.md) AllowAddtoAllowedList
- `OnVerifyModifyAllowedList(TableId: Integer; var ModifyAllowed: Boolean)` (internal): This is an internal event that only this module is allowed to subscribe to. It is raised by a subscriber to the OnBeforeModifyEvent of the Reten. Pol. Allowed Table table. The manual subscriber AllowModifyAllowedList is bound just before the Modify() in procedure AddToAllowedTables. These elements c...
  - subscribers: [Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl."](../codeunit/3906.md) AllowModifyAllowedList

## Event subscriptions

- AllowAddtoAllowedList subscribes to Codeunit "Reten. Pol. Allowed Tbl. Impl." OnVerifyAddtoAllowedList
- AllowModifyAllowedList subscribes to Codeunit "Reten. Pol. Allowed Tbl. Impl." OnVerifyModifyAllowedList

## Procedures

- `AddToAllowedTables(TableId: Integer; DefaultDateFieldNo: Integer; CallerModuleInfo: ModuleInfo; MandatoryMinRetenDays: Integer; TableFilters: JsonArray): Boolean`
- `AddToAllowedTables(TableId: Integer; DefaultDateFieldNo: Integer; CallerModuleInfo: ModuleInfo; MandatoryMinRetenDays: Integer; RetenPolFiltering: Enum "Reten. Pol. Filtering"; RetenPolDeleting: Enum "Reten. Pol. Deleting"; TableFilters: JsonArray): Boolean`
- `RemoveFromAllowedTables(TableId: Integer): Boolean`
- `IsAllowedTable(TableId: Integer): Boolean`
- `GetAllowedTables(var AllowedList: List of [Integer])`
- `GetRetenPolFiltering(TableId: Integer): Enum "Reten. Pol. Filtering"`
- `GetRetenPolDeleting(TableId: Integer): Enum "Reten. Pol. Deleting"`
- `GetDefaultDateFieldNo(TableId: Integer): Integer`
- `GetMandatoryMinimumRetentionDays(TableId: Integer): Integer`
- `CalcMinimumExpirationDate(TableId: Integer): Date`
- `GetAllowedTables(): Text`
- `AddTableFilterToJsonArray(var TableFilters: JsonArray; RetentionPeriodEnum: Enum "Retention Period Enum"; DateFieldNo: Integer; Enabled: Boolean; Locked: Boolean; RecordRef: RecordRef)`
- `AddTableFilterToJsonArray(var TableFilters: JsonArray; RetPeriodCalc: DateFormula; DateFieldNo: Integer; Enabled: Boolean; Locked: Boolean; RecordRef: RecordRef)`
- `AddTableFilterToJsonArray(var TableFilters: JsonArray; RetentionPeriodEnum: Enum "Retention Period Enum"; RetPeriodCalc: DateFormula; DateFieldNo: Integer; Enabled: Boolean; Locked: Boolean; RecordRef: RecordRef)`
- `GetTableFilters(TableId: Integer): JsonArray`
- `ParseTableFilter(JsonObject: JsonObject; var TableId: Integer; var RetentionPeriodEnum: Enum "Retention Period Enum"; var RetPeriodCalc: DateFormula; var DateFieldNo: Integer; var Enabled: Boolean; var Locked: Boolean; var TableFilter: Text)`
- `VerifyInsertAllowed(TableId: Integer)`
- `VerifyModifyAllowed(TableId: Integer)`
- `SetTruncateAllowed(TableId: Integer; TruncateAllowed: Boolean; CallerModuleInfo: ModuleInfo)`
- `IsTruncateAllowed(TableId: Integer): Boolean`

Plus 10 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3908 "Retention Policy Log"](../codeunit/3908.md) (7 calls: `AllowAddtoAllowedList → LogInfo`, `AllowModifyAllowedList → LogInfo`, `GetDefaultDateFieldNo → LogWarning`, …)
- [Codeunit 417 "Tenant Information"](../codeunit/417.md) (1 call: `ModuleOwnsTable → GetTenantId`)

## Called by

- [Codeunit 3905 "Reten. Pol. Allowed Tables"](../codeunit/3905.md) (14 calls: `AddAllowedTable → AddToAllowedTables`, `AddTableFilterToJsonArray → AddTableFilterToJsonArray`, `CalcMinimumExpirationDate → CalcMinimumExpirationDate`, …)
- [Codeunit 3903 "Retention Policy Setup Impl."](../codeunit/3903.md) (3 calls: `InsertDefaultTableFiltersOnAfterInsertRetenPolSetup → GetTableFilters`, `InsertDefaultTableFiltersOnAfterInsertRetenPolSetup → ParseTableFilter`, `VerifyRetentionPolicyAllowedTablesOnBeforeInsertRetenPolSetup → GetTableFilters`)
- [Codeunit 3904 "Apply Retention Policy Impl."](../codeunit/3904.md) (1 call: `TruncateTableRecords → IsTruncateAllowed`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Reten. Pol. Allowed Tbl. Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
