Skip to content

Conversation

@StefanSosic
Copy link
Contributor

@StefanSosic StefanSosic commented Oct 28, 2025

Summary

The extensibility part was separated from PR #4495

Work Item(s)

Fixes #4494

Fixes AB#611443

@StefanSosic StefanSosic requested a review from a team as a code owner October 28, 2025 15:26
@github-actions github-actions bot added AL: System Application From Fork Pull request is coming from a fork labels Oct 28, 2025
@JesperSchulz JesperSchulz added Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item labels Oct 29, 2025
@github-actions github-actions bot added this to the Version 28.0 milestone Oct 29, 2025
@JesperSchulz
Copy link
Contributor

@StefanSosic, please check build / test issues.

exit(FileScenarioImpl.GetFileAccountOrDefault(Enum::"File Scenario"::Default, TempFileAccount));
end;

/// <summary>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StefanSosic you changed the behaviour of the method GetFileAccount.

    /// <summary>
    /// Gets the file account used by the given file scenario.
    /// If the no account is defined for the provided scenario, the default account (if defined) will be returned.
    /// </summary>
    /// <param name="Scenario">The scenario to look for.</param>
    /// <param name="TempFileAccount">Out parameter holding information about the file account.</param>
    /// <returns>True if an account for the specified scenario was found; otherwise - false.</returns>
    procedure GetFileAccount(Scenario: Enum "File Scenario"; var TempFileAccount: Record "File Account" temporary): Boolean
    begin
        exit(FileScenarioImpl.GetFileAccount(Scenario, TempFileAccount));
        // Needs to be changed to:
        // exit(FileScenarioImpl.GetFileAccountOrDefault(Scenario, TempFileAccount));
    end;

Now this method won't return the Default File Account.
To be non breaking I would suggest to call the new method GetFileAccountOrDefault.

Furthermore I would suggest to add a new procedure in the public facade:

    /// Gets the file account used by the given file scenario.
    /// </summary>
    /// <param name="Scenario">The scenario to look for.</param>
    /// <param name="TempFileAccount">Out parameter holding information about the file account.</param>
    /// <returns>True if an account for the specified scenario was found; otherwise - false.</returns>
    procedure GetSpecificFileAccount(Scenario: Enum "File Scenario"; var TempFileAccount: Record "File Account" temporary): Boolean
    begin
        exit(FileScenarioImpl.GetFileAccount(Scenario, TempFileAccount));
    end;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not return default at first place, so in this case it's by design

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you should update the documentation.

Copy link
Contributor Author

@StefanSosic StefanSosic Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since tests are complaining to this point likewise
I think we will do here a bit refactoring, something like you mentioned in first comment. Naming will still be wrong, so thinking still whats best to do, maybe even adjusting tests, but let's see
Thanks for pointing it out 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: System Application From Fork Pull request is coming from a fork Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BC Idea]: Extensibility adjustments to File Account module in order for External Storage module

3 participants