Skip to content

[Subcontracting] Backport: Fix bug 640115 - Subc. Order FlowField incorrect#8759

Merged
ChethanT merged 8 commits into
releases/28.xfrom
backport/28.x/bug-640115
Jun 26, 2026
Merged

[Subcontracting] Backport: Fix bug 640115 - Subc. Order FlowField incorrect#8759
ChethanT merged 8 commits into
releases/28.xfrom
backport/28.x/bug-640115

Conversation

@ChethanT

@ChethanT ChethanT commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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

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)
@ChethanT ChethanT requested a review from a team June 23, 2026 19:49
@ChethanT ChethanT requested a review from a team as a code owner June 23, 2026 19:49
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jun 23, 2026
@github-actions github-actions Bot added this to the Version 28.3 milestone Jun 23, 2026
ChethanT and others added 4 commits June 23, 2026 23:26
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>
Comment thread src/Apps/W1/Subcontracting/Test/Tests/SubcPurchSubcontTest.Codeunit.al Outdated
@ChethanT ChethanT enabled auto-merge (squash) June 24, 2026 21:40
@ChethanT ChethanT changed the title Backport: Fix bug 640115 - Subc. Order FlowField incorrect [Subcontracting] Backport: Fix bug 640115 - Subc. Order FlowField incorrect Jun 25, 2026
@ChethanT ChethanT added the Subcontracting Subcontracting related activities label Jun 25, 2026
PredragMaricic
PredragMaricic previously approved these changes Jun 25, 2026
@ChethanT ChethanT dismissed stale reviews from PredragMaricic and AleksandricMarko via cd58b96 June 25, 2026 12:42
@ChethanT ChethanT merged commit ab1b4d4 into releases/28.x Jun 26, 2026
45 checks passed
@ChethanT ChethanT deleted the backport/28.x/bug-640115 branch June 26, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Subcontracting Subcontracting related activities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants