---
id: change/bcapps/14502
type: change
title: "#14502 [main][Subcontracting] Create Return includes components and WIP from unrelated purchase orders"
summary: Return transfer orders in subcontracting now correctly filter by purchase order number to prevent including lines from unrelated orders.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report subc. create subcreturnorder
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-11-28T01:06:56.904Z"
  flags: []
generated:
  at: "2026-12-01T00:17:57.990Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: add604316006ecb098f2a6d8c8470ea5916b73ea
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14502
    title: "microsoft/BCApps#14502: [main][Subcontracting] Create Return includes components and WIP from unrelated purchase orders"
    date: "2026-11-27"
    commit: add604316006ecb098f2a6d8c8470ea5916b73ea
    t: null
    quote: Filter matching return headers by Subcontr. Purch. Order No. and update regression coverage to verify purchase-order isolation.
links:
  learn: []
  objects:
    - object/report/20502
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/sales-how-process-sales-returns-orders
      title: Process sales return orders
      label: possibly related
      why: Return orders creation and handling components aligns with sales return order process documentation.
      by: model
number: 14502
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14502
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-27T06:42:43Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 232
  deletions: 10
  al: 1
apps:
  - Subcontracting
objects_touched:
  - key: report/20502
    page: report/20502
    type: report
    id: 20502
    name: Subc. Create SubCReturnOrder
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 660503
systems:
  - manufacturing
quote: Filter matching return headers by Subcontr. Purch. Order No. and update regression coverage to verify purchase-order isolation.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #14502 [main][Subcontracting] Create Return includes components and WIP from unrelated purchase orders

> Return transfer orders in subcontracting now correctly filter by purchase order number to prevent including lines from unrelated orders.

[Pull request](https://github.com/microsoft/BCApps/pull/14502) · merged into `main` (BC30) on 2026-11-27 by Shikhverma · 2 files (+232 -10), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Return transfer headers are now filtered by Subcontr. Purch. Order No. when creating return orders
- Prevents mixing of components and WIP from different subcontracting purchase orders
- Regression test coverage expanded to verify purchase-order isolation
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 20502 "Subc. Create SubCReturnOrder"](../../objects/report/20502.md), Subcontracting: modified

## Context

- Work items: AB#660503
- Labels: AL: Apps (W1), Team: SCM
- Systems: manufacturing
- From the description: "Filter matching return headers by Subcontr. Purch. Order No. and update regression coverage to verify purchase-order isolation."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Process sales return orders](https://learn.microsoft.com/dynamics365/business-central/sales-how-process-sales-returns-orders) — possibly related: Return orders creation and handling components aligns with sales return order process documentation. (model-linked)

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).
