---
id: change/bcapps/10206
type: change
title: "#10206 Bug 646576: Preserve manually changed component Flushing Method on subcontracting transfers"
summary: Production order components in subcontracting transfers no longer lose their manually set Flushing Method when moved to or from the subcontractor location. A new helper function preserves the Flushing Method during automatic location changes while maintaining all validation side effects.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit subcontracting management
  - codeunit subc. prod. order comp. ext.
  - report subc. create subcreturnorder
  - report subc. create transf. order
  - codeunit subc. transorderpostrcpt ext
  - codeunit subc. transorderposttrans ext
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:24.384Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 8bc02bb98e0593e328a06230f42d219c98a680c5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10206
    title: "microsoft/BCApps#10206: Bug 646576: Preserve manually changed component Flushing Method on subcontracting transfers"
    date: "2026-08-13"
    commit: 8bc02bb98e0593e328a06230f42d219c98a680c5
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/20505
    - object/codeunit/20524
    - object/report/20502
    - object/report/20501
    - object/codeunit/20540
    - object/codeunit/20547
    - object/codeunit/20504
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10206
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10206
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-13T21:39:29Z"
author: ChethanT
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - Subcontracting
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 8
  additions: 302
  deletions: 15
  al: 7
apps:
  - Subcontracting
objects_touched:
  - key: codeunit/20505
    page: codeunit/20505
    type: codeunit
    id: 20505
    name: Subcontracting Management
    app: Subcontracting
    status: modified
  - key: codeunit/20524
    page: codeunit/20524
    type: codeunit
    id: 20524
    name: Subc. Prod. Order Comp. Ext.
    app: Subcontracting
    status: modified
  - key: report/20502
    page: report/20502
    type: report
    id: 20502
    name: Subc. Create SubCReturnOrder
    app: Subcontracting
    status: modified
  - key: report/20501
    page: report/20501
    type: report
    id: 20501
    name: Subc. Create Transf. Order
    app: Subcontracting
    status: modified
  - key: codeunit/20540
    page: codeunit/20540
    type: codeunit
    id: 20540
    name: Subc. TransOrderPostRcpt Ext
    app: Subcontracting
    status: modified
  - key: codeunit/20547
    page: codeunit/20547
    type: codeunit
    id: 20547
    name: Subc. TransOrderPostTrans Ext
    app: Subcontracting
    status: modified
  - key: codeunit/20504
    page: codeunit/20504
    type: codeunit
    id: 20504
    name: Subc. Transfer Management
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 646576
systems:
  - manufacturing
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10206 Bug 646576: Preserve manually changed component Flushing Method on subcontracting transfers

> Production order components in subcontracting transfers no longer lose their manually set Flushing Method when moved to or from the subcontractor location. A new helper function preserves the Flushing Method during automatic location changes while maintaining all validation side effects.

[Pull request](https://github.com/microsoft/BCApps/pull/10206) · merged into `main` (BC30) on 2026-08-13 by ChethanT · 8 files (+302 -15), 7 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- New helper function ValidateProdOrderCompLocationPreservingFlushingMethod preserves the Flushing Method during automatic subcontracting location moves
- Flushing Method is captured before location validation and restored via plain assignment afterward to avoid triggering OnValidate errors
- All subcontracting location shuttles updated: forward/return transfer reports, direct-transfer posts, and component restore operations
- Plain assignment ensures Bin Code remains unchanged and avoids validation errors on Backward flushing method with consumption entries
- Comprehensive test coverage added with forward transfer and full lifecycle tests demonstrating the fix works with partial consumption
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 20505 "Subcontracting Management"](../../objects/codeunit/20505.md), Subcontracting: modified
- [Codeunit 20524 "Subc. Prod. Order Comp. Ext."](../../objects/codeunit/20524.md), Subcontracting: modified
- [Report 20502 "Subc. Create SubCReturnOrder"](../../objects/report/20502.md), Subcontracting: modified
- [Report 20501 "Subc. Create Transf. Order"](../../objects/report/20501.md), Subcontracting: modified
- [Codeunit 20540 "Subc. TransOrderPostRcpt Ext"](../../objects/codeunit/20540.md), Subcontracting: modified
- [Codeunit 20547 "Subc. TransOrderPostTrans Ext"](../../objects/codeunit/20547.md), Subcontracting: modified
- [Codeunit 20504 "Subc. Transfer Management"](../../objects/codeunit/20504.md), Subcontracting: modified

## Context

- Work items: AB#646576
- 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).
