Codeunit 3904 "Apply Retention Policy Impl."
System Application · System.DataAdministration
Across versions
- BC23-24present
- BC252 procedures added, 1 procedures removed
- BC26-27unchanged
- BC281 procedures added
- BC29-30unchanged
Neighbourhood 11 connected objects and pages
System Application · System.DataAdministration · BC23-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
| TableNo | Retention Policy Setup |
| Permissions | tabledata AllObjWithCaption = r |
Procedures
ApplyRetentionPolicy(UserInvokedRun: Boolean)ApplyRetentionPolicy(RetentionPolicySetup: Record "Retention Policy Setup"; Manual: Boolean; UserInvokedRun: Boolean)GetExpiredRecordCount(RetentionPolicySetup: Record "Retention Policy Setup"; var ExpiredRecordExpirationDate: Date): IntegerSetWhereOlderExpirationDateFilter(DateFieldNo: Integer; ExpirationDate: Date; var RecordRef: RecordRef; FilterGroup: Integer; NullDateReplacementValue: Date)SetWhereNewerExpirationDateFilter(DateFieldNo: Integer; ExpirationDate: Date; var RecordRef: RecordRef; FilterGroup: Integer; NullDateReplacementValue: Date)SetSingleDateExpirationDateFilter(DateFieldNo: Integer; ExpirationDate: Date; var RecordRef: RecordRef; FilterGroup: Integer; NullDateReplacementValue: Date)MaxNumberOfRecordsToDelete(): Integer(internal)NumberOfRecordsToDeleteBuffer(): Integer+ BC25 (internal)TruncateTableRecords(RetentionPolicySetup: Record "Retention Policy Setup")+ BC28
Plus 15 local procedures.
Triggers
OnRun
Relations
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” (15 calls:
ApplyRetentionPolicy → LogInfo,CanApplyRetentionPolicy → LogError,ConfirmApplyRetentionPolicies → LogError, …) - Codeunit 3905 “Reten. Pol. Allowed Tables” (3 calls:
CanApplyRetentionPolicy → IsAllowedTable,DeleteExpiredRecords → GetRetenPolDeleting,GetExpiredRecords → GetRetenPolFiltering) - Codeunit 3910 “Apply Retention Policy” (3 calls:
DeleteExpiredRecords → OnApplyRetentionPolicyIndirectPermissionRequired,RaiseRecordLimitExceededEvent → OnApplyRetentionPolicyRecordLimitExceeded,TruncateTableRecords → OnTruncateRecordsIndirectPermissionRequired) - Codeunit 152 “User Permissions” (2 calls:
TruncateTableRecords → GetEffectivePermission,VerifyIndirectDeletePermission → GetEffectivePermission) - Codeunit 3906 “Reten. Pol. Allowed Tbl. Impl.” (1 call:
TruncateTableRecords → IsTruncateAllowed) - Codeunit 3912 “Reten. Policy Telemetry Impl.” (1 call:
DeleteExpiredRecords → SendTelemetryOnRecordsDeleted) - Codeunit 3917 “Record Reference” (1 call:
GetExpiredRecords → Initialize) - Codeunit 8703 “Feature Telemetry” (1 call:
TruncateTableRecords → LogUsage)
Called by
- Codeunit 3910 “Apply Retention Policy” (7 calls:
ApplyRetentionPolicy → ApplyRetentionPolicy,GetExpiredRecordCount → GetExpiredRecordCount,OnRun → (object), …) - Codeunit 3915 “Reten. Pol. Filtering Impl.” (1 call:
ApplyRetentionPolicySubSetFilters → MaxNumberOfRecordsToDelete) - Codeunit 3916 “Reten. Pol. Delete. Impl.” (1 call:
NumberOfRecordsToDeleteBuffer → NumberOfRecordsToDeleteBuffer)
Recent changes
- 2026-09-23 #11262 Fix retention policy deletion-limit stop propagation (main, BC30, fix)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Clean up data with retention policies — possibly related: Apply Retention Policy Impl. executes data retention policies to delete outdated data from tables. (model-linked)
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: "Apply Retention Policy Impl."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.