Skip to content

[Extensibility] Manufacturing cost calculation - missing events for split Setup / Runtime cost in BC 28 #30129

@rickblommetjes

Description

@rickblommetjes

Summary

Business Central blends Setup Cost and Runtime Cost into a single Direct Unit Cost on Work Centers / Machine Centers. For make-to-order manufacturers, this produces inaccurate per-unit costs when lot sizes vary, because setup cost is fixed per run while runtime cost scales with quantity.

We are implementing a Setup Cost vs. Runtime Cost split entirely via event subscribers (no base object modifications), but we have hit extensibility gaps in BC 28 that block a clean implementation.


Top-priority gaps (High severity)

1. Missing integration events in CalcRtngCostSKU — 🔴 High

The SKU-specific routing cost code path (CalcRtngCostSKU) has no integration events, so ISVs cannot inject split-cost logic for SKU-level calculations. The standard CalcRtngCost path has events, but the SKU variant is entirely opaque.

Ask: Add OnBefore / OnAfter (with IsHandled) integration events to CalcRtngCostSKU, mirroring what already exists in CalcRtngCost.

3. OnAfterCalcRtngLineCost does not expose DirUnitCost — 🔴 High

The event OnAfterCalcRtngLineCost fires but omits the DirUnitCost parameter. Subscribers must redundantly recalculate it, which is fragile and error-prone.

Ask: Add DirUnitCost (and ideally SetupCost / RunCost) as VAR parameters to OnAfterCalcRtngLineCost so subscribers can both read and override the value without re-deriving it.


Additional gaps (Medium / Low severity)

# Gap Severity
2 CalculateCostTime returns a single combined value; ISVs must call it twice and reverse-engineer setup vs. runtime portions Medium
4 CalcProdOrderLineExpCost lacks OnBefore / IsHandled and per-line split support; no clean override point for expected cost calculation Medium
5 Standard Cost Worksheet extensibility relies on indirect event subscriptions that could break silently Low

Context

  • AppSource ISV: Easystep2 BV (Easy Manufacturing extension)
  • BC version: 28
  • Implementation approach: 100% event subscribers, no base object modifications
  • Use case: Make-to-order manufacturers needing accurate per-unit cost across varying lot sizes

These are all small, non-breaking additions (new parameters to existing events, new events on uncovered code paths). They follow the existing patterns already established in the manufacturing cost codeunits.

Thank you for considering this!
Internal work item: AB#636806

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions