Trading File
Release: Trading File – 27.0.9694.36624
Description
This release focuses on a critical bug fix where the Unit Cost was being lost on Purchase Lines linked to Trading Files after the Location Code was updated. The standard price engine was overwriting the Trading File–sourced unit cost during Location Code validation. A new subscriber codeunit has been introduced to preserve the original unit cost. Additionally, the Assisted Setup registration has been improved to handle re-run scenarios and license/permission checks more gracefully, and the install routine now gates TDF Application Area activation on a license type check.
User Stories
No User Story developed in this release.
Bugs
| Title | Description | Impact on previous version |
|---|---|---|
| [24256] – Unit Cost is Lost after Location Code is updated | When a Purchase Line was linked to a Trading File and the user changed the Location Code, the standard BC price engine (via “Purchase Line - Price” codeunit) would recalculate and overwrite the Direct Unit Cost originally set from the Trading File Line. The expected behavior is that the Trading File Unit Cost is preserved. Fix: A new SingleInstance codeunit briTDF_PurchasePriceSubscriber (ID 8087188) subscribes to OnBeforeSetPrice and OnAfterSetPrice on the “Purchase Line - Price” codeunit. Before pricing, it snapshots the TDF-sourced unit cost; after pricing, it restores it if the price engine changed it. Additional hardening: FindFirstTradingHeaderStatusEnabled in codeunit 8087177 now uses a guarded if FindFirst() then pattern to prevent runtime errors when no qualifying status setup record exists. A new secondary key (Key3) was added to table 8087165 for efficient status lookups. The Assisted Setup (codeunit 8087187) was fixed to properly handle re-run of completed setup and now skips silently when the user lacks the required license or permissions. The Install codeunit (8087162) now gates TDF Application Area activation on a license type check via IsBasic. |
Medium risk – The new PurchasePriceSubscriber codeunit intercepts the price engine flow for TDF-linked purchase lines only. No impact on standard purchase lines. The Assisted Setup behavior change (SkipOnMissingLicense/Permission = true) means the subscriber will no longer raise errors for unlicensed users. The Install codeunit change means TDF Application Area will only be enabled for Basic license types; environments with other license types may need manual activation. |
Events
No event added or updated in this release.