ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] report 840 "Suggest Worksheet Lines" - Create new event OnInsertCFLineForGLAccountOnBeforeInsertTempCFWorksheetLine
Describe the request
Could we please have a new event OnInsertCFLineForGLAccountOnBeforeInsertTempCFWorksheetLine in the function InsertCFLineForGLAccount from report 840 "Suggest Worksheet Lines"
Code:
local procedure InsertCFLineForGLAccount(GLAcc: Record "G/L Account")
begin
with CFWorksheetLine2 do begin
Init();
"Source Type" := "Source Type"::"Liquid Funds";
"Source No." := GLAcc."No.";
"Document No." := GLAcc."No.";
"Cash Flow Account No." := "Cash Flow Account"."No.";
Description :=
CopyStr(
StrSubstNo(Text013, GLAcc.Name, Format(GLAcc.Balance)),
1, MaxStrLen(Description));
SetCashFlowDate(CFWorksheetLine2, WorkDate());
"Amount (LCY)" := GLAcc.Balance;
"Shortcut Dimension 2 Code" := GLAcc."Global Dimension 2 Code";
"Shortcut Dimension 1 Code" := GLAcc."Global Dimension 1 Code";
MoveDefualtDimToJnlLineDim(DATABASE::"G/L Account", GLAcc."No.", "Dimension Set ID");
//>>>>
OnInsertCFLineForGLAccountOnBeforeInsertTempCFWorksheetLine(CFWorksheetLine2, "Cash Flow Forecast", "Cash Flow Account");
//<<<<
InsertTempCFWorksheetLine(CFWorksheetLine2, 0);
end;
end;
Event signature:
[IntegrationEvent(false, false)]
local procedure OnInsertCFLineForGLAccountOnBeforeInsertTempCFWorksheetLine(var CashFlowWorksheetLine: Record "Cash Flow Worksheet Line"; CashFlowForecast: Record "Cash Flow Forecast"; "Cash Flow Account": Record "Cash Flow Account");
begin
end;
Additional context
We require updating some fields in CFWorksheetLine2 before performing the insertion. Internal work item: AB#502639
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.
Build ID: 16827.