[Subcontracting] Backport: Fix bug 640115 - Subc. Order FlowField incorrect#8759
Merged
Conversation
The 'Subc. Order' FlowField on Purchase Header was checking base table fields 'Prod. Order No.' and 'Prod. Order Line No.' on Purchase Line. These fields are not reliably populated by the Subcontracting app's purchase order creation flow. Changed the CalcFormula to use 'Subc. Purchase Line Type' = filter(<> None), which is the extension field that the Subcontracting app reliably sets and is already used by the Manufacturing Cue for counting subcontracting lines. Added test SubcOrderFlowFieldIsTrueAfterCreatingSubcontractingPurchaseOrder to verify the FlowField evaluates correctly. Fixes AB#640115 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 63cfaf5)
WorkCenter.'Unit of Measure Code' is a capacity UOM that doesn't exist in the Unit of Measure table. Create the item first, then use its Base Unit of Measure for the Production BOM Header. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The test was trying to locate a Prod. Order Routing Line directly, but the existing helper already encapsulates the correct Type = Work Center filter and purchase order creation flow. Reuse it so the test targets the actual subcontracting scenario instead of depending on an incomplete lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use SubcWarehouseLibrary.CreateSubcontractingOrderFromProdOrderRouting, which exists on this branch, instead of a non-existent call on SubcontractingMgmtLibrary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Select the released Prod. Order Routing Line by production order and work center before invoking CreateSubcontracting. This avoids relying on a routing-no-based lookup that can miss the generated routing line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ChethanT
commented
Jun 24, 2026
ChethanT
commented
Jun 24, 2026
AleksandricMarko
previously approved these changes
Jun 25, 2026
PredragMaricic
previously approved these changes
Jun 25, 2026
cd58b96
PredragMaricic
approved these changes
Jun 26, 2026
alexei-dobriansky
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8757 to releases/28.x.
Cherry-picked from commit 63cfaf5 (Bug 640115: Fix Subc. Order FlowField to use Subc. Purchase Line Type).
Fixes AB#640115