Move French accelerated depreciation to W1 base application#9090
Move French accelerated depreciation to W1 base application#9090ventselartur wants to merge 1 commit into
Conversation
| TransferFields(Database::"Posted Gen. Journal Line", 10861, 5865); // 10861 - the existing field "Derogatory Line", 5865 - the new field "Is Derogatory"; | ||
| TransferFields(Database::"Depreciation Book", 10800, 5865); // 10800 - the existing field "Derogatory Calculation", 5865 - the new field "Derogatory Calc."; | ||
| TransferFields(Database::"Depreciation Book", 10802, 5867); // 10802 - the existing field "G/L Integration - Derogatory", 5867 - the new field "Integration G/L - Derogatory"; | ||
| TransferFields(Database::"FA Depreciation Book", 10801, 5865); // 10801 - the existing field "Last Derogatory Date", 5865 - the new field "Derogatory Amount"; |
There was a problem hiding this comment.
The FA Depreciation Book migration maps old field 10801 Last Derogatory Date into new field 5865 Derogatory Amount, but 5865 is the new FlowField and the persisted replacement date field is 5866 Last Derogatory.
As written, existing dates are not migrated to the new stored field. Change this transfer to target 5866.
| TransferFields(Database::"FA Depreciation Book", 10801, 5865); // 10801 - the existing field "Last Derogatory Date", 5865 - the new field "Derogatory Amount"; | |
| TransferFields(Database::"FA Depreciation Book", 10801, 5866); // 10801 - the existing field "Last Derogatory Date", 5866 - the new field "Last Derogatory"; |
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
| SourceFieldRef := RecRef.Field(SourceFieldNo); | ||
| SourceFieldRef.SetFilter('<>%1', ''); | ||
|
|
||
| if RecRef.FindSet() then |
There was a problem hiding this comment.
The upgrade helper migrates moved fields with a row-by-row `FindSet() ...
Modify(false)loop. That is the anti-pattern called out for new fields on existing tables, and here it runs against tenant-scale tables such asFA Ledger EntryandPosted Gen. Journal Line. Replace the generic loop with set-based DataTransfer` migrations.
Knowledge:
👍 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: 1 knowledge-backed · 1 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Why
French Fixed Assets relies on "accelerated depreciation" (amortissement dérogatoire /
derogatory depreciation), which today exists only in the FR local Base Application layer.
This deliverable moves that capability into the W1 Base Application so derogatory
depreciation becomes a first-class, cross-localization feature. New W1 fields, accounts,
and posting logic are introduced, the FR-specific fields and code are obsoleted (CLEAN29),
and existing FR data is migrated into the new W1 fields through Feature Management so no
customer data is lost.
Summary
Depreciation Book, FA Depreciation Book, FA Posting Group, FA Ledger Entry, Gen. Journal
Line, Posted Gen. Journal Line, and FA Reclass. Journal Line in the W1 Base Application.
AcceleratedDepreciationFeature Management feature (Accelerated Depr. Feature+Feature - Accelerated Depr.enum extension) with a data-update task thatcopies existing FR field values into the new W1 fields and reports affected records.
Upgrade Accelerated Depr.upgrade codeunit andUpg. Tag Accelerated Depr.upgrade tag to migrate data and mark completion when the feature becomes default (v31.0).
CLEAN29, pendingremoval once the feature is always-on in version 31.0.
depreciation, feature bugs, local fixed assets, and UT COD/REP/TAB suites).
DK, ES, FI, GB, IT, NL, NO, RU, US) and updated Contoso demo data / GL account helpers.
Fixes AB#617319