Delocalize FI Currency Exchange Rate import into FI Core#9405
Delocalize FI Currency Exchange Rate import into FI Core#9405djukicmilica wants to merge 4 commits into
Conversation
Move the Finnish fixed-format currency-rate file import out of the FI BaseApp layer into the FI Core extension app. - Add codeunit 13413 'Currency Exch. Rate Import' to FI Core (moved from BaseApp codeunit 32000001 'Currency Exchange Rate'; logic unchanged, OnBeforeFileImport integration event and OnPrem scope preserved). - Add pageextension 13414 'Currencies FI' extending page 5 'Currencies' to re-expose the 'Import Exchange Rates' action running the moved codeunit. - Move the test to FI Core Tests as codeunit 148151 'Currency Exch. Rate File Test' (subscriber rewired to the new codeunit). - Remove the 'Import Exchange Rates' action from the FI BaseApp Currencies page override and delete the BaseApp codeunit and test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 731eaef8-bab7-4b1c-840e-f409b4de0195
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
Both lookups in the moved import logic filter on the full primary key and then call FindFirst instead of using Get: Currency is keyed solely on Code (SetFilter(Code, ...) + FindFirst), and Currency Exchange Rate is keyed on (Currency Code, Starting Date) (SetFilter/SetRange on both fields + FindFirst).Per the referenced guidance, when every primary-key field is known at the call site, Get expresses the lookup as a key seek and communicates intent more clearly than composing filters and calling FindFirst. Suggested fix (apply manually — could not be anchored as a one-click suggestion): if not CurrencyExchRate.Get(Valuuttakoodi, StartingDate) then
if Currency.Get(Valuuttakoodi) then beginKnowledge: Posting this finding as an issue comment because inline comment placement failed. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
| using System.IO; | ||
|
|
||
| codeunit 32000001 "Currency Exchange Rate" | ||
| codeunit 13413 "Currency Exch. Rate Import" |
There was a problem hiding this comment.
This PR renames/moves BaseApp codeunit 32000001 'Currency Exchange Rate' to a new app (FI Core) as codeunit 13413 'Currency Exch.
Rate Import', and removes the 'Import Exchange Rates' action from the BaseApp Currencies page override, without any ObsoleteState staging. Per the referenced guidance, retiring a BaseApp object should go through a Pending release (with ObsoleteReason/ObsoleteTag) before removal, so any per-tenant customization or extension still referencing codeunit 32000001 or the object name 'Currency Exchange Rate' by ID/name is not stranded. This repo's own precedent for the same delocalization pattern (e.g. the FI Depreciation Differences delocalization, commit 8b26e1e) does stage the BaseApp removal behind ObsoleteState Pending/Removed and CLEAN-version guards with upgrade code; this PR deletes the object outright instead.
Knowledge:
- microsoft/knowledge/upgrade/obsolete-pending-to-removed-staging.md
- microsoft/knowledge/upgrade/obsoletion-requires-reason-and-tag.md
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
Copilot PR ReviewIteration 1 · Outcome: completed
Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 2 knowledge-backed · 0 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Summary
Delocalizes the Finnish Currency Exchange Rate import from the FI BaseApp layer into the FI Core extension app.
Changes
FI Core:
13415 "Currency Exch. Rate Import"with the fixed-format import logic and preservedOnBeforeFileImportevent.13414 "Currencies FI"with the visible Import Exchange Rates action.FI BaseApp compatibility:
32000001 "Currency Exchange Rate"under#if not CLEAN29and marks itPendingfor version29.0.OnBeforeFileImportevent as obsolete.Pending.144001 CurrencyExchangeRateFile; no new test codeunit is added.