- 
                Notifications
    You must be signed in to change notification settings 
- Fork 270
Extensibility Interface for File Scenario #5337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Extensibility Interface for File Scenario #5337
Conversation
| @StefanSosic, please check build / test issues. | 
| exit(FileScenarioImpl.GetFileAccountOrDefault(Enum::"File Scenario"::Default, TempFileAccount)); | ||
| end; | ||
|  | ||
| /// <summary> | 
There was a problem hiding this comment.
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;There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🚀
Summary
The extensibility part was separated from PR #4495
Work Item(s)
Fixes #4494
Fixes AB#611443