[Subcontracting] Fix subcontracting order opening wrong purchase order after creation#8811
[Subcontracting] Fix subcontracting order opening wrong purchase order after creation#88116CRIPT wants to merge 5 commits into
Conversation
…he last one created
Copilot PR ReviewIteration 5 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 2 knowledge-backed · 3 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
There was a problem hiding this comment.
Pull request overview
This PR addresses an issue in the Subcontracting app where, after creating subcontracting purchase orders from production order routing lines, the UI could open the wrong purchase order (typically an existing one matching the same routing-line filters).
Changes:
- Track and mark newly created purchase order headers by diffing purchase lines before/after running “Carry Out Action Msg. - Req.”.
- Update the “show created purchase order(s)” flow to open the marked purchase order(s) instead of searching by routing/operation fields.
- Remove now-unneeded operation/routing-reference state plumbing from the routing page extension.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al | Adds logic to collect existing PO numbers, mark newly created PO headers, and use marked headers when showing created orders. |
| src/Apps/W1/Subcontracting/App/src/Manufacturing/SubcProdOrderRtng.PageExt.al | Removes operation/routing-reference setter calls since the creator codeunit now tracks created orders internally. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes AB#639381