[Event Request] PAGE 234 "Apply Employee Entries" OnBeforeEarlierPostingDateError
trigger OnQueryClosePage(CloseAction: Action): Boolean
begin
if CloseAction = ACTION::LookupOK then
LookupOKOnPush;
if ApplnType = ApplnType::"Applies-to Doc. No." then begin
OLD CODE if OK and (TempApplyingEmplLedgEntry."Posting Date" < "Posting Date") then begin
NEW CODE if OK then begin RaiseError := ApplyingCustLedgEntry."Posting Date" < "Posting Date"; OnBeforeEarlierPostingDateError(ApplyingCustLedgEntry, Rec, RaiseError, CalcType); if RaiseError then begin
OK := false;
Error(
EarlierPostingDateErr, TempApplyingEmplLedgEntry."Document Type", TempApplyingEmplLedgEntry."Document No.",
"Document Type", "Document No.");
end;
if OK then begin
if "Amount to Apply" = 0 then
"Amount to Apply" := "Remaining Amount";
CODEUNIT.Run(CODEUNIT::"Empl. Entry-Edit", Rec);
end;
end;
[IntegrationEvent(false, false)] local procedure OnBeforeEarlierPostingDateError(ApplyingEmplLedgerEntry: Record "Employee Ledger Entry"; EmplLedgerEntry: Record "Employee Ledger Entry"; var RaiseError: Boolean; CalcType: Option) begin end;
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.