---
id: object/codeunit/3908
type: object
title: Codeunit 3908 "Retention Policy Log"
summary: Codeunit 3908 "Retention Policy Log" in System Application (System.DataAdministration). 4 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  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: b0527bd38980b05d81ac1bb14c268e87e745c3c8450e5c6c01dc1709bb7b3f0e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Retention%20Policy/src/Retention%20Policy%20Log/RetentionPolicyLog.Codeunit.al
    title: src/System Application/App/Retention Policy/src/Retention Policy Log/RetentionPolicyLog.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: 3908
name: Retention Policy Log
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: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 4
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 17
  implements: 0
---

# Codeunit 3908 "Retention Policy Log"

> Codeunit 3908 "Retention Policy Log" in System Application (System.DataAdministration). 4 public procedures. Present since at least BC23, still in BC30.

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%20Log/RetentionPolicyLog.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `LogError(Category: Enum "Retention Policy Log Category"; Message: Text[2048])`: LogError will create an entry in the Retention Policy Log Entry table with Message Type set to Error. An error message will be displayed to the user and any changes in the current transaction will be reverted.
- `LogError(Category: Enum "Retention Policy Log Category"; Message: Text[2048]; DisplayError: Boolean)`: LogError will create an entry in the Retention Policy Log Entry table with Message Type set to Error. If DisplayError is true, an error message will be displayed to the user and any changes in the current transaction will be rolled back. If DisplayError is false, no error is displayed, the code cont...
- `LogWarning(Category: Enum "Retention Policy Log Category"; Message: Text[2048])`: LogWarning will create an entry in the Retention Policy Log Entry table with Message Type set to Warning. No message is displayed to the user.
- `LogInfo(Category: Enum "Retention Policy Log Category"; Message: Text[2048])`: LogInfo will create an entry in the Retention Policy Log Entry table with Message Type set to Info. No message is displayed to the user.

## 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 3909 "Retention Policy Log Impl."](../codeunit/3909.md) (3 calls: `LogError → LogError`, `LogInfo → LogInfo`, `LogWarning → LogWarning`)

## Called by

- [Codeunit 3904 "Apply Retention Policy Impl."](../codeunit/3904.md) (15 calls: `ApplyRetentionPolicy → LogInfo`, `CanApplyRetentionPolicy → LogError`, `ConfirmApplyRetentionPolicies → LogError`, …)
- [Codeunit 3903 "Retention Policy Setup Impl."](../codeunit/3903.md) (7 calls: `CheckRecordLockedOnRetentionPolicySetupLine → LogError`, `CheckRecordLockedOnRetentionPolicySetupLine → LogInfo`, `InsertDefaultTableFiltersOnAfterInsertRetenPolSetup → LogWarning`, …)
- [Codeunit 3906 "Reten. Pol. Allowed Tbl. Impl."](../codeunit/3906.md) (7 calls: `AllowAddtoAllowedList → LogInfo`, `AllowModifyAllowedList → LogInfo`, `GetDefaultDateFieldNo → LogWarning`, …)
- [Codeunit 3915 "Reten. Pol. Filtering Impl."](../codeunit/3915.md) (4 calls: `ApplyRetentionPolicyAllRecordFilters → LogInfo`, `ApplyRetentionPolicyAllRecordFilters → LogWarning`, `ApplyRetentionPolicySubSetFilters → LogInfo`, …)
- [Codeunit 3997 "Retention Policy JQ"](../codeunit/3997.md) (3 calls: `OnRun → LogInfo`, `ScheduleJobQueueEntryOnApplyRetentionPolicyRecordLimitExceeded → LogInfo`, `ScheduleJobQueueEntryOnApplyRetentionPolicyRecordLimitExceeded → LogWarning`)
- [Codeunit 3900 "Retention Period Impl."](../codeunit/3900.md) (2 calls: `RetentionPeriodDateFormula → LogError`, `ValidateRetentionPeriodDateFormula → LogError`)
- [Codeunit 3902 "Retention Policy Setup"](../codeunit/3902.md) (2 calls: `ErrorOnBeforeRenameRetentionPolicySetup → LogError`, `ErrorOnBeforeRenameRetentionPolicySetupLine → LogError`)
- [Codeunit 3916 "Reten. Pol. Delete. Impl."](../codeunit/3916.md) (2 calls: `DeleteRecords → LogWarning`, `LimitRecordsToBeDeleted → LogInfo`)
- [Codeunit 3994 "Reten. Pol. Doc. Arch. Fltrng."](../codeunit/3994.md) (2 calls: `ApplyRetentionPolicySubSetFilters → LogInfo`, `ValidateExpirationDate → LogError`)
- [Codeunit 3998 "Retention Policy Scheduler"](../codeunit/3998.md) (2 calls: `ScheduleRecurringRetentionPolicy → LogInfo`, `UnScheduleRecurringRetentionPolicy → LogInfo`)
- [Codeunit 1598 "Email Logs Delete"](../codeunit/1598.md) (1 call: `DeleteRecordsWithIndirectPermissionsOnApplyRetentionPolicyIndirectPermissionRequired → LogError`)
- [Codeunit 1930 "Performance Profiler Delete"](../codeunit/1930.md) (1 call: `DeleteRecordsWithIndirectPermissionsOnApplyRetentionPolicyIndirectPermissionRequired → LogError`)
- [Codeunit 3901 "Retention Period Custom Impl."](../codeunit/3901.md) (1 call: `RetentionPeriodDateFormula → LogError`)
- [Codeunit 3905 "Reten. Pol. Allowed Tables"](../codeunit/3905.md) (1 call: `ErrorOnBeforeRenameAllowedTable → LogError`)
- [Codeunit 3913 "Retention Policy Logs Delete"](../codeunit/3913.md) (1 call: `DeleteRecordsWithIndirectPermissionsOnApplyRetentionPolicyIndirectPermissionRequired → LogError`)
- [Codeunit 3995 "Base Application Logs Delete"](../codeunit/3995.md) (1 call: `DeleteRecordsWithIndirectPermissionsOnApplyRetentionPolicyIndirectPermissionRequired → LogError`)
- [Codeunit 6450 "Serv. Integration Mgt."](../codeunit/6450.md) (1 call: `DeleteRecordsWithIndirectPermissionsOnApplyRetentionPolicyIndirectPermissionRequired → LogError`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

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: "Retention Policy Log")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
