Skip to content

[event publisher change] in event "Inventory Profile Offsetting" (Codeunit 99000854) #29870

@lhadhazi9940

Description

@lhadhazi9940

Why do you need this change?

We are currently working on an upgrade project and implementing the MRP system. For this, we need to influence the planning behavior during the SKU loop iteration.

Specifically, we need to adjust prioritization between demands and supplies within the loop, which requires controlling the planning state dynamically.

At the moment, the parameter NextState in the publisher OnPlanItemOnBeforePlanThisSKULoopIteration is passed by value, which prevents us from modifying the planning result within our extension.

By changing NextState to a var parameter, we would be able to adjust the planning state dynamically in a clean and supported way, without modifying standard code.

This is a minimal and non-breaking change that improves extensibility and aligns with common patterns in Business Central.

If possible, we would highly appreciate having this change already in BC27, as it is required for our current project timeline.

Describe the request

#########Original########

  [IntegrationEvent(false, false)]
    local procedure OnPlanItemOnBeforePlanThisSKULoopIteration(var StockkeepingUnit: Record "Stockkeeping Unit"; NextState: Option; var DemandInventoryProfile: Record "Inventory Profile"; var SupplyInventoryProfile: Record "Inventory Profile"; var SupplyExists: Boolean; var DemandExists: Boolean; var LotAccumulationPeriodStartDate: Date)
    begin
    end;

########Modified########

    [IntegrationEvent(false, false)]
    local procedure OnPlanItemOnBeforePlanThisSKULoopIteration(var StockkeepingUnit: Record "Stockkeeping Unit";var NextState: Option; var DemandInventoryProfile: Record "Inventory Profile"; var SupplyInventoryProfile: Record "Inventory Profile"; var SupplyExists: Boolean; var DemandExists: Boolean; var LotAccumulationPeriodStartDate: Date)
    begin
    end;

Internal work item: AB#626804

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