#9448 [Extensibility Request] issue 30264: add and extend events in CalcBestDirectUnitCost
Two new integration events and an extended existing event provide customization points in purchase price selection logic, allowing subscribers to override minimum-quantity checks, best-price selection rules, and no-price fallback handling without duplicating internal loops.
- 1files
- 1AL files
- 1objects
Pull request · merged into main (BC30) on 2026-07-30 by AleksandricMarko · 1 file (+35 -19), 1 AL · feature · tier official · reviewed (checked by Opus)
What changed
- OnCalcBestDirectUnitCostOnAfterIsInMinQty event lets subscribers override per-price minimum-quantity logic
- OnCalcBestDirectUnitCostOnBeforeCaseStatement event allows replacing best-price selection rules with IsHandled skip flag
- OnCalcBestDirectUnitCostOnBeforeNoPriceFound extended with SKU-related parameters for fallback cost interception
- Events expose PurchasePrice record and related state to reduce need for logic re-implementation
- Supports per-price-record customization in codeunit 7010 without modifying core loops
AL objects touched
- Codeunit 7010 “Purch. Price Calc. Mgt.”, Base Application: modified
Context
- Work items: AB#641452
- Labels: Team: SCM, event-request
- Systems: purchasing
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).