#9396 [Subcontracting] Fix subcontracting order opening wrong purchase order after creation
Fixed subcontracting order creation to open the newly created purchase order instead of displaying an old received one when production order quantity was increased after a previous subcontracting operation.
- 3files
- 2AL files
- 2objects
Pull request · merged into main (BC30) on 2026-07-31 by 6CRIPT · 3 files (+195 -52), 2 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Subcontracting order creation now correctly opens the newly created purchase order when the production order quantity increases
- The fix captures purchase orders created or updated in the current invocation before determining which ones to display
- Filtering logic was aligned with existing PurchLineExists logic to only show open, unreceived lines
- Fallback handling ensures the feature still works when an existing open PO is updated instead of creating a new one
- Two integration tests were added to cover the delta-PO and updated-open-PO scenarios
- Behaviour changes for users or extensions.
AL objects touched
- Page extension 20503 “Subc. Prod. Order Rtng.”, Subcontracting: modified
- Codeunit 20557 “Subc. Purchase Order Creator”, Subcontracting: modified
Context
- Work items: AB#639381
- Labels: AL: Apps (W1), Subcontracting, Team: SCM
- Systems: manufacturing
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).