Codeunit 9040 Date Compression

Base Application, Microsoft.Foundation.Period

Source AL, 643 lines

src/Layers/W1/BaseApp/Foundation/Period/DateCompression.Codeunit.allines 28 to 43 of 643, Copyright (c) Microsoft Corporation. MIT

codeunit 9040 "Date Compression"{    var        EndingDateMissingErr: Label 'You must specify an ending date.';        DescriptionMissingErr: Label 'You must specify a description.';        DateCompressionEndingDateErr: Label 'The end date %1 is not valid. You must keep at least %2 years uncompressed.', Comment = '%1 is a date in short date format, %2 is an integer';        DateCompressionStartingDateErr: Label 'The start date %1 must be before the end date %2', Comment = '%1 and %2 are dates in short date format';        AccountingPeriodMustBeDateLockedErr: Label 'The accounting periods for the period you wish to date compress must be Date Locked.';        NoAccountingPeriodsErr: Label 'No accounting periods have been set up. In order to run date compression you must set up accounting periods.';        MinUncompressedYearsErr: Label 'The number of years to keep uncompressed cannot be less than 1.';        DefaultDateCompressionDescriptionLbl: Label 'Date Compressed', Comment = 'this label is used as a description on compressed entries.', MaxLength = 100;        StartDateCompressionTelemetryMsg: Label 'Running date compression codeunit %1.', Locked = true;        EndDateCompressionTelemetryMsg: Label 'Completed date compression codeunit %1.', Locked = true;        DateCompressionCompletedLbl: Label 'Date compression completed by UserSecurityId %1 in company %2.', Comment = '%1 - User Security ID, %2 - Company name', Locked = true;    procedure InitDateComprSettingsBuffer(var DateComprSettingsBuffer: Record "Date Compr. Settings Buffer")

All 643 lines

Events 1 in 29

[IntegrationEvent] OnSetMinimumNumberOfYearsToKeep(var NumberOfYearsToKeep: Integer)new in 18

Public procedures 4 in 29

InitDateComprSettingsBuffer(var DateComprSettingsBuffer: Record "Date Compr. Settings Buffer")new in 18
VerifyDateCompressionDates(StartingDate: Date; EndingDate: Date)new in 18
RunDateCompression(var DateComprSettingsBuffer: Record "Date Compr. Settings Buffer")new in 18
CalcMaxEndDate(): Datenew in 18