Skip to content

[Extensibility] Add integration event in Codeunit 99000819 before GetPlanningParameters.AtSKU in CreatePlanningComponentFromProdBOM #30015

@andbyPrague

Description

@andbyPrague

Why do you need this change?

In multi-warehouse manufacturing scenarios, the component location (PlanningComponent."Location Code") must sometimes be overridden based on custom business rules before the system resolves the component's SKU. A common real-world case: a company manufactures goods at one location but sources components from a different location depending on the component item. The standard logic assigns PlanningComponent."Location Code" from SKU."Components at Location", but partners need to override this per-item before SKU parameters are resolved.

The SKU resolution happens in GetPlanningParameters.AtSKU(...) and determines critical planning fields such as "Flushing Method" and "Planning Level Code". Without an event before this call, any location override made in a subscriber has no effect ΓÇö the wrong SKU is used, leading to incorrect flushing method and planning level on the component.

The nearest existing event OnTransferBOMOnBeforeGetDefaultBin fires after GetPlanningParameters.AtSKU has already executed, making it unsuitable as a workaround.

Describe the request

Add an [IntegrationEvent] in Codeunit 99000819 "Mfg. Planning Line Management", procedure CreatePlanningComponentFromProdBOM, immediately before the call to GetPlanningParameters.AtSKU(...). The event should expose PlanningComponent, ProductionBOMLine, RequisitionLine, and SKU so subscribers can modify the component location before SKU parameters are resolved.

Suggested name: OnCreatePlanningComponentFromProdBOMOnBeforeGetPlanningParameters
The event should be inserted after:

PlanningComponent.Validate("Calculation Formula", ProdBOMLine."Calculation Formula");
and before:

GetPlanningParameters.AtSKU(CompSKU, PlanningComponent."Item No.", PlanningComponent."Variant Code", PlanningComponent."Location Code");

Internal work item: AB#635594

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions