You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add an event OnAfterSetEntryFilters in procedure CalcCFAccount, immediately after the filters for CFForecastEntry or AnalysisViewEntry have been applied and the ColValue is calculated.
procedure CalcCFAccount(var CFAccount: Record "Cash Flow Account"; var AccSchedLine: Record "Acc. Schedule Line"; var ColumnLayout: Record "Column Layout") ColValue: Decimal
var
CFForecastEntry: Record "Cash Flow Forecast Entry";
AnalysisViewEntry: Record "Analysis View Entry";
AmountType: Enum "Account Schedule Amount Type";
IsHandled: Boolean;
begin
ColValue := 0;
IsHandled := false;
OnBeforeCalcCFAcc(CFAccount, AccSchedLine, ColumnLayout, ColValue, IsHandled);
if IsHandled then
exit(ColValue);
if AccSchedName.Name <> AccSchedLine."Schedule Name" then
AccSchedName.Get(AccSchedLine."Schedule Name");
if ConflictAmountType(AccSchedLine, ColumnLayout."Amount Type", AmountType) then
exit(0);
if ColumnLayout."Column Type" <> ColumnLayout."Column Type"::Formula then
case ColumnLayout."Ledger Entry Type" of
ColumnLayout."Ledger Entry Type"::Entries:
if AccSchedName."Analysis View Name" = '' then begin
SetCFEntryFilters(CFAccount, CFForecastEntry, AccSchedLine, ColumnLayout);
case ColumnLayout."Amount Type" of
ColumnLayout."Amount Type"::"Net Amount":
begin
CFForecastEntry.CalcSums("Amount (LCY)");
ColValue := CFForecastEntry."Amount (LCY)";
end;
end;
end
else begin
SetCFAnalysisViewEntryFilters(CFAccount, AnalysisViewEntry, AccSchedLine, ColumnLayout);
case ColumnLayout."Amount Type" of
ColumnLayout."Amount Type"::"Net Amount":
begin
AnalysisViewEntry.CalcSums(Amount);
ColValue := AnalysisViewEntry.Amount;
end;
end;
end;
ColumnLayout."Ledger Entry Type"::"Budget Entries":
if AccSchedName."Analysis View Name" = '' then begin
SetCFEntryFiltersForBudgetEntries(CFAccount, CFForecastEntry, AccSchedLine, ColumnLayout);
case ColumnLayout."Amount Type" of
ColumnLayout."Amount Type"::"Net Amount":
begin
CFForecastEntry.CalcSums("Amount (LCY)");
ColValue := CFForecastEntry."Amount (LCY)";
end;
end;
end;
end;
OnAfterSetEntryFilters(CFAccount, AccSchedLine, ColumnLayout, ColValue); // <--- New Event
end;
exit(ColValue);
end;
Integration Event Definition
[IntegrationEvent(false, false)]
local procedure OnAfterSetEntryFilters(var CFAccount: Record "Cash Flow Account"; var AccSchedLine: Record "Acc. Schedule Line"; var ColumnLayout: Record "Column Layout"; var ColValue: Decimal)
begin
end;
Additional context
This event is required to allow additional processing or customization after the filters have been set. For example, in our case, additional logic is applied to handle budget entries with specific filters and calculations.
Describe the request
Please add an event OnAfterSetEntryFilters in procedure CalcCFAccount, immediately after the filters for CFForecastEntry or AnalysisViewEntry have been applied and the ColValue is calculated.
Integration Event Definition
Additional context
This event is required to allow additional processing or customization after the filters have been set. For example, in our case, additional logic is applied to handle budget entries with specific filters and calculations.
Event 3/3
Internal work item: AB#561474
The text was updated successfully, but these errors were encountered: