Advanced Price Management
Release: Advanced Price Management – 26.0.9741.68505
Description
This release of Advanced Price Management delivers two key improvements. First, it introduces a comprehensive set of new integration events across the price calculation engine (Codeunit 8120268 and Codeunit 8120282), enabling developers to extend and customize price line filtering, buffer population, discount and price application logic through standard event subscriptions. Second, it fixes a visual regression introduced by the Business Central 28 “Show Currency” field in General Ledger Setup, which incorrectly displayed a currency symbol on percentage-based discount values in Sales Line Details pages. These changes strengthen extensibility for Food & Beverage and other industry-specific pricing scenarios while correcting user-facing display issues.
User Stories
| Title | Description | Setup Instructions | Impact on previous version |
|---|---|---|---|
| [24304] – Add new events for filtering price line | Three new integration events have been added to allow developers to inject custom filters on price lines and enrich the price calculation buffer with additional document fields (e.g., shipment method, payment method). Events are added in Codeunit 8120268 (isaAPM_PriceCalc. - isatech) function FindPriceLines and in Codeunit 8120282 (isaAPM_PriceCalculationBuffMgt) functions FillPriceCalculationBufferHeaderValues and FillPriceCalculationBufferLineValues. In total, 20 new IntegrationEvents have been introduced across both codeunits, plus additional before/after event pairs for ApplyDiscount, ApplyPrice, CopyToBuffer, and manual discount line detail insertion. | Impacted objects: Codeunit 8120268, Codeunit 8120282. No setup required — events are available for subscription by dependent extensions. | No breaking changes. One event marked obsolete: OnAfterCalcUnitAmountRoundingPrecision in Codeunit 8120268 (replaced by OnAfterCalculateUnitAmountRoundingPrecision). Existing subscribers to this obsolete event should migrate to the new event signature. |
Bugs
| Title | Description | Impact on previous version |
|---|---|---|
| [24269] – Currency symbol displayed on percentage discount values in Sales Line Details | When the BC28 “Show Currency” field in General Ledger Setup was set to anything other than “Never”, the “Application Value” field on Sales Line Detail pages (Document, Posted Document, and Archive) incorrectly displayed percentage-based discount values with a currency symbol instead of a plain decimal. The fix refactors the GetCurrencyCode function to accept a FieldNo parameter and adds an early-exit guard: when the field is “Application Value” and the line type is Discount or Grouped Line Discount, an empty currency code is returned. Additionally, the “Application Value” field layout has been changed from AutoFormatExpression/AutoFormatType to DecimalPlaces = 2 : 5, ensuring consistent plain decimal rendering. | Impacted objects: Page 8120275 (isaAPM_SalesLineDetail), Page 8120276 (isaAPM_PostedSalesLineDetail), Page 8120277 (isaAPM_ArchivedSalesLineDetail). The OnAfterGetCurrencyCode event on Page 8120276 is no longer raised for Discount/Grouped Line Discount lines on the “Application Value” field due to the early-exit guard. Subscribers relying on this event for those specific line types will no longer be invoked. No other breaking changes. |
Events
| Status | Type | Object Name | Event Name | Description |
|---|---|---|---|---|
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnBeforeApplyDiscount | Raised at the start of ApplyDiscount. Setting IsHandled to true skips standard discount calculation. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterApplyDiscount | Raised after ApplyDiscount has completed. Exposes FoundDiscount and DiscountValue. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnBeforeApplyPrice | Raised at the start of ApplyPrice. Setting IsHandled to true skips standard price calculation. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterApplyPrice | Raised after ApplyPrice has completed. Exposes CalledByFieldNo, FoundPrice, and PriceToUpdate. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterSetPriceLineFilters | Raised in FindPriceLines after standard filters are applied and before the asset/source marking loop. Enables custom price line filters. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterFindPriceLines | Raised at the end of FindPriceLines. Exposes AmountType, ShowAll, TempPriceCalculationBuffer, PriceLineBuffer, and PriceLineExists. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnBeforeFallbackToItemCardPrice | Raised before fallback to Item Card Unit Price when no price line is found. Setting IsHandled to true suppresses the fallback. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnBeforeDoInsertManualDiscountLineDetail | Raised before manual discount SalesLineDetail record insert. |
| New | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterDoInsertManualDiscountLineDetail | Raised after manual discount SalesLineDetail record insert. |
| Obsolete | IntegrationEvent | isaAPM_PriceCalc. - isatech | OnAfterCalcUnitAmountRoundingPrecision | Marked obsolete since v26.0.0.0. Replaced by OnAfterCalculateUnitAmountRoundingPrecision with TempPriceCalculationBuffer parameter. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnBeforeCopyToBuffer | Raised before buffer initialization in CopyToBuffer. Setting IsHandled to true skips standard buffer population. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterCopyToBuffer | Raised after buffer is fully populated in CopyToBuffer. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnBeforeFillPriceCalculationBufferHeaderValues | Raised before header mapping. Setting IsHandled to true bypasses default Sales Header mapping. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterFillPriceCalculationBufferHeaderValues | Raised after header mapping. Allows appending or overriding header-derived buffer values. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnBeforeFillPriceCalculationBufferLineValues | Raised before line mapping. Setting IsHandled to true bypasses default Sales Line mapping. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterFillPriceCalculationBufferLineValues | Raised after line mapping. Allows appending or overriding line-derived buffer values. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterFillPriceCalculationBufferFromSalesHeader | Raised after all Sales Header fields have been mapped to buffer. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterFillPriceCalculationBufferFromSalesLine | Raised after all Sales Line fields have been mapped to buffer. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnAfterSetSubstituteSourceOnBuffer | Raised after substitute source item/variant/UOM fields are applied to buffer. |
| New | IntegrationEvent | isaAPM_PriceCalculationBuffMgt | OnBeforeSetDiscountLineAmountFromUnitPrice | Raised before standard discount line amount calculation (Qty × Unit Price). Setting IsHandled to true uses subscriber-provided LineAmount. |
| Updated | IntegrationEvent | isaAPM_PostedSalesLineDetail | OnAfterGetCurrencyCode | Event signature unchanged, but no longer raised for “Application Value” on Discount/Grouped Line Discount lines due to early-exit guard in GetCurrencyCode. |
Notes
- ⚠️ Obsolete event:
OnAfterCalcUnitAmountRoundingPrecisionin Codeunit 8120268 is marked obsolete since v26.0.0.0. Subscribers should migrate toOnAfterCalculateUnitAmountRoundingPrecision. - ⚠️ Behavioral change:
OnAfterGetCurrencyCodeon Page 8120276 (isaAPM_PostedSalesLineDetail) is no longer raised for Discount/Grouped Line Discount lines on the “Application Value” field. Subscribers targeting these specific line types should adapt their logic accordingly.