Codeunit 3910 Apply Retention Policy

System Application, System.DataAdministration

Source AL, 165 lines

src/System Application/App/Retention Policy/src/Apply Retention Policy/ApplyRetentionPolicy.Codeunit.allines 11 to 26 of 165, Copyright (c) Microsoft Corporation. MIT

codeunit 3910 "Apply Retention Policy"{    Access = Public;    /// <summary>    /// Applies all enabled, non-manual retention polices. This will delete records according to the settings defined in the Retention Policy Setup table.    /// </summary>    trigger OnRun()    begin        Codeunit.Run(Codeunit::"Apply Retention Policy Impl.");    end;    /// <summary>    /// Applies all enabled, non-manual retention polices. This will delete records according to the settings defined in the Retention Policy Setup table.    /// </summary>    /// <param name="UserInvokedRun">Use this value to indicate whether the user initiated the function call or an automated process did. This value is later passed in the event OnApplyRetentionPolicyRecordLimitExceeded.</param>

All 165 lines

Events 3 in 29

[IntegrationEvent] OnApplyRetentionPolicyRecordLimitExceeded(CurrTableId: Integer; NumberOfRecordsRemainingToBeDeleted: Integer; ApplyAllRetentionPolicies: Boolean; UserInvokedRun: Boolean; var Handled: Boolean)17-29
[IntegrationEvent] OnApplyRetentionPolicyIndirectPermissionRequired(var RecRef: RecordRef; var Handled: Boolean)17-29
[IntegrationEvent] OnTruncateRecordsIndirectPermissionRequired(var RecRef: RecordRef; var Handled: Boolean)new in 28

Public procedures 8 in 29

ApplyRetentionPolicy(UserInvokedRun: Boolean)17-29
ApplyRetentionPolicy(RetentionPolicySetup: Record "Retention Policy Setup"; UserInvokedRun: Boolean)17-29
GetExpiredRecordCount(RetentionPolicySetup: Record "Retention Policy Setup"): Integer17-29
SetWhereOlderExpirationDateFilter(DateFieldNo: Integer; ExpirationDate: Date; var RecordRef: RecordRef; FilterGroup: Integer; NullDateReplacementValue: Date)17-29changed in 20
SetWhereNewerExpirationDateFilter(DateFieldNo: Integer; ExpirationDate: Date; var RecordRef: RecordRef; FilterGroup: Integer; NullDateReplacementValue: Date)17-29changed in 20
GetExpiredRecordCount(RetentionPolicySetup: Record "Retention Policy Setup"; var ExpiredRecordExpirationDate: Date): Integernew in 21

All 8 procedures

Changes 2 in 28

List17181920212223242526272829
Procedures221
Events1
TruncateTableRecords(RetentionPolicySetup: Record "Retention Policy Setup")new in 28
added
[IntegrationEvent] OnTruncateRecordsIndirectPermissionRequired(var RecRef: RecordRef; var Handled: Boolean)new in 28
added

All 6 changes in 17-29