ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] table 846 "Cash Flow Worksheet Line"

Open panas78 opened this issue 4 years ago • 5 comments

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;

panas78 avatar Dec 31 '21 11:12 panas78

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.

JesperSchulz avatar Jan 15 '22 06:01 JesperSchulz

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.

sergeyol avatar Dec 03 '24 20:12 sergeyol

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 ?

panas78 avatar Dec 04 '24 17:12 panas78

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.

sergeyol avatar Dec 04 '24 18:12 sergeyol

Hello, That will work just fine.

panas78 avatar Dec 05 '24 07:12 panas78