ALAppExtensions
ALAppExtensions copied to clipboard
[EventRequest] Codeunit 2000042- Post Coded Bank Statement
Hello,
We need new event in the Codeunit 2000042 (OnBeforeInsertGenJournalLine) :
procedure TransferCodBankStmtLines() var Window: Dialog; LineNo: Integer; TotLines: Integer; LineCounter: Integer; begin Window.Open( '#1#################################\' + Text003);
if GenJnlLine.FindLast then;
LineNo := GenJnlLine."Line No.";
with CodBankStmtLine do begin
TotLines := Count;
LineCounter := 0;
Window.Update(1, StrSubstNo(Text004, "Bank Account No.", "Statement No.",
GenJnlTemplate.Name));
FindSet;
repeat
// Test if Coded Bank statement line has been posted yet
if ("Journal Template Name" <> '') or
("Journal Batch Name" <> '') or
("Line No." <> 0)
then
Error(Text005, "Document No.");
if Amount <> 0 then begin
OnTransferCodBankStmtLinesOnBeforeInitGenJnlLine(CodBankStmtLine);
LineCounter := LineCounter + 1;
GenJnlLine.Init();
LineNo := LineNo + 10000;
GenJnlLine."Journal Template Name" := GenJnlTemplate.Name;
GenJnlLine."Journal Batch Name" := BatchName;
GenJnlLine."Line No." := LineNo;
....
GenJnlLine.Validate("Account No.", "Account No.");
GenJnlLine."Applies-to ID" := "Applies-to ID";
GenJnlLine.Validate(Amount, -Amount);
GenJnlLine."System-Created Entry" := true;
// New event request >>
OnBeforeInsertGenJournalLine(GenJnlLine,CodBankStmtLine);
// New event request <<
GenJnlLine.Insert();
....
until Next = 0;
end;
Window.Close
end;
Signature : LOCAL [IntegrationEvent] OnBeforeInsertGenJournalLine(Var GenJnlLine: Record "Gen. Journal Line",CodBankStmtLine: Record "CODA Statement Line")
Thank you Kind Regards Rishta
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.