Skip to content

[Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512

@dmonteagudo-pwd

Description

@dmonteagudo-pwd

Why do you need this change?

Description

Request to add a specific integration event at the beginning of SetRtngLineSequenceBack procedure in Planning Routing Management codeunit (ID: 99000808) to enable partners to implement a critical workaround for a data consistency bug.

Critical Business Need

There is a critical bug in SetRtngLineSequenceBack where the procedure works with record data that has been reset to zeros by previous ModifyAll operations in CalcSequenceBack. This causes incorrect sequence calculations and data corruption in manufacturing planning.

Partners need an event at the VERY BEGINNING of the procedure to:

  1. Refresh the record data using PlanningRtngLine.Get()
  2. Ensure the procedure works with current database state
  3. Prevent manufacturing planning errors

Describe the request

    procedure SetRtngLineSequenceBack(RoutingType: Option Serial,Parallel; PlanningRtngLine: Record "Planning Routing Line"; Maxsequences: Integer; Actsequences: Integer; TotalCalculation: Boolean)
    var
        PlanningRtngLine2: Record "Planning Routing Line";
        SequenceNo: Integer;
        IsHandled: Boolean; //++ NEW VARIABLE ++
    begin
       //-- NEW EVENT --
       OnBeforeSetRtngLineSequenceBack(RoutingType, PlanningRtngLine, MaxSeq, ActSeq, TotalCalculation, IsHandled);
       if IsHandled then
         exit;
       //++ NEW EVENT ++

        if RoutingType = RoutingType::Parallel then begin
            if (Actsequences - 1) > Maxsequences then
                ErrorInRouting(
                  PlanningRtngLine."Worksheet Line No.", Text001, Actsequences, Maxsequences);
[IntegrationEvent(false, false)]
local procedure OnBeforeSetRtngLineSequenceBack(RoutingType: Option; var PlanningRtngLine: Record "Planning Routing Line"; var MaxSeq: Integer; var ActSeq: Integer; TotalCalculation: Boolean; var IsHandled: Boolean)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions