-
Notifications
You must be signed in to change notification settings - Fork 687
Closed
Closed
[Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceForward#29607
Task
Copy link
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update
Description
Why do you need this change?
Description
Request to add a specific integration event at the beginning of SetRtngLineSequenceForward
procedure in Planning Routing Management codeunit (ID: 99000808) to enable partners to
implement a critical workaround for a data consistency bug.
This is a follow-up to issue #29512 (OnBeforeSetRtngLineSequenceBack), where the same
underlying issue exists but affects the Forward sequence calculation function.
Context
- Issue [Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512 addressed
SetRtngLineSequenceBackwith event request - This issue addresses
SetRtngLineSequenceForwardwhich has identical structure and bug - Both functions are used in the same planning workflow (
CalculateRouting) - Both functions suffer from the same parameter-by-value issue causing memory-database desynchronization
Describe the request
Current Code (Problematic)
procedure SetRtngLineSequenceForward(
RoutingType: Option Serial,Parallel;
PlanningRtngLine: Record "Planning Routing Line";
MaxSequences: Integer;
ActSequences: Integer;
TotalCalculation: Boolean)
var
PlanningRtngLine2: Record "Planning Routing Line";
SequenceNo: Integer;
begin
// ❌ MISSING EVENT - Add here
// OnBeforeSetRtngLineSequenceForward(RoutingType, PlanningRtngLine, MaxSequences, ActSequences, TotalCalculation);
if RoutingType = RoutingType::Parallel then begin
if ActSequences > MaxSequences then
ErrorInRouting(
PlanningRtngLine."Worksheet Line No.", Text001, ActSequences, MaxSequences);
// ... rest of procedureProposed Solution
Add a new integration event at the beginning of the SetRtngLineSequenceForward procedure:
procedure SetRtngLineSequenceForward(
RoutingType: Option Serial,Parallel;
PlanningRtngLine: Record "Planning Routing Line";
MaxSequences: Integer;
ActSequences: Integer;
TotalCalculation: Boolean)
var
PlanningRtngLine2: Record "Planning Routing Line";
SequenceNo: Integer;
begin
// ✅ NEW EVENT (follows same pattern as #29512)
OnBeforeSetRtngLineSequenceForward(RoutingType, PlanningRtngLine, MaxSequences, ActSequences, TotalCalculation);
if RoutingType = RoutingType::Parallel then begin
if ActSequences > MaxSequences then
ErrorInRouting(
PlanningRtngLine."Worksheet Line No.", Text001, ActSequences, MaxSequences);Event Publisher (add at the end of the codeunit with other events):
[IntegrationEvent(false, false)]
local procedure OnBeforeSetRtngLineSequenceForward(
RoutingType: Option Serial,Parallel;
var PlanningRtngLine: Record "Planning Routing Line";
MaxSequences: Integer;
ActSequences: Integer;
TotalCalculation: Boolean)
begin
end;File: PlanningRoutingManagement.Codeunit.al
Location: Line ~158 (beginning of procedure) + Event definition at end of codeunit
Why This is Needed
- Consistency: Issue [Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512 added
OnBeforeSetRtngLineSequenceBackevent; this adds the missing twin event forSetRtngLineSequenceForward - Symmetry: Both procedures are called in the same
CalculateRoutingmethod and both need the same extensibility - Workaround: Partners need this event to bypass the data consistency bug until the underlying parameter-by-reference issue is fixed in the core product
- Manufacturing Impact: Critical for production planning workflows (MRP/MPS calculations)
Business Impact
- Affected Process: Manufacturing Planning (MRP/MPS)
- Affected Customers: Anyone using advanced routing scenarios with parallel operations
- Current Workaround: Requires CodeunitExtension with EventSubscriber pattern (inefficient)
- Proposed Fix Timeline: Include with [Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512 in same release/update
Additional Information
Related Issues
- [Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512: OnBeforeSetRtngLineSequenceBack (APPROVED & CLOSED)
- This issue extends that request to the symmetrical function
Internal References
- Codeunit: 99000808 "Planning Routing Management"
- Functions:
SetRtngLineSequenceForward(line ~158) - Related:
CalcSequenceForward(calls the function)
Implementation Effort
- Minimal: Event pattern already established in [Event Request] codeunit 99000808 "PlanningRoutingManagement" OnBeforeSetRtngLineSequenceBack #29512
- File Changes: Only
PlanningRoutingManagement.Codeunit.al - Compatibility: No breaking changes (additive only)
Internal work item: AB#618980
Metadata
Metadata
Assignees
Labels
SCMGitHub request for SCM areaGitHub request for SCM areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update