[Event Request] table 846 "Cash Flow Worksheet Line"
Please add new event OnAfterGetNumberOfSourceTypes in Table Cash Flow Worksheet Line function GetNumberOfSourceTypes
procedure GetNumberOfSourceTypes() Result: Integer
begin
Result := 16;
OnAfterGetNumberOfSourceTypes(Result);
exit(Result);
end;
[IntegrationEvent(false, false)]
local procedure OnAfterGetNumberOfSourceTypes(var Result: Integer)
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. 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.
Hello @panas78, we have created an issue to replace the call to GetNumberOfSourceTypes() function during cash flow chart generation and iterate through Enum ordinals instead.
As such, the discussion is whether to obsolete the function as it is not used anymore.
Does the new logic align with how you use the functionality and the event? Thanks.
Hello @panas78, we have created an issue to replace the call to GetNumberOfSourceTypes() function during cash flow chart generation and iterate through Enum ordinals instead.
As such, the discussion is whether to obsolete the function as it is not used anymore.
Does the new logic align with how you use the functionality and the event? Thanks.
We still use the event along with enum extension on "Cash Flow Source Type". Can you please share the part of relevant code changes, just to get a more confident understanding ?
You may see the full PR here - https://github.com/microsoft/BusinessCentralApps/pull/1083
But if there is no access, basically we are proposing to replace the code that uses the function:
for SourceType := 1 to CashFlowWorksheetLine.GetNumberOfSourceTypes() do begin
with
foreach SourceType in "Cash Flow Source Type".Ordinals() do begin
After that, the function is not being used anymore in the base application, so it is proposed to obsolete it.
Hello, That will work just fine.