[Event Request] Codeunit 5601 "FA Insert G/L Account" - OnGetBalAccAfterRestoreGenJnlLineFields (new parameter to existing event)
Hello colleagues,
We would like to extend existing event (or add a new event) in codeunit 5601 "FA Insert G/L Account": OnGetBalAccAfterRestoreGenJnlLineFields(GenJnlLine, TempGenJnlLine);
The current implementation of the event does not provide TempFAGLPostBuf variable, which is used to create a journal. We need it for Journal Line creation.
New event signature (changes on bold):
[IntegrationEvent(false, false)] local procedure OnGetBalAccAfterRestoreGenJnlLineFields(var ToGenJnlLine: Record "Gen. Journal Line"; FromGenJnlLine: Record "Gen. Journal Line"; var FAGLPostBuf: Record "FA G/L Posting Buffer")
codeunit 5601 "FA Insert G/L Account"
if TempFAGLPostBuf.FindFirst then
repeat
"Line No." := 0;
Validate("Account No.", TempFAGLPostBuf."Account No.");
Validate(Amount, TempFAGLPostBuf.Amount);
Validate("Depreciation Book Code", '');
"Shortcut Dimension 1 Code" := TempFAGLPostBuf."Global Dimension 1 Code";
"Shortcut Dimension 2 Code" := TempFAGLPostBuf."Global Dimension 2 Code";
"Dimension Set ID" := TempFAGLPostBuf."Dimension Set ID";
Description := TempGenJnlLine.Description;
"FA Add.-Currency Factor" := TempGenJnlLine."FA Add.-Currency Factor";
// >>>>>>>>>>>>>>>
OnGetBalAccAfterRestoreGenJnlLineFields(GenJnlLine, TempGenJnlLine,TempFAGLPostBuf);
// <<<<<<<<<<<<<<<
InsertGenJnlLine(GenJnlLine);
until TempFAGLPostBuf.Next = 0;
Best regards, Mike
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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.