---
id: change/bcapps/9741
type: change
title: "#9741 [Subcontracting] Bug 638816: Preserve Transfer WIP Item flag when toggling off Direct Transfer without a transit route"
summary: Fixed a bug where toggling off Direct Transfer on a Subcontracting Transfer Order with a WIP item and no transfer route caused an error. The Transfer WIP Item flag is now properly preserved during the toggle operation.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit subc. transfer line ext.
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:11:08.687Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 5e3b7ae9e109afc2ec738858c2755801dcfaa4b3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9741
    title: "microsoft/BCApps#9741: [Subcontracting] Bug 638816: Preserve Transfer WIP Item flag when toggling off Direct Transfer without a transit route"
    date: "2026-07-28"
    commit: 5e3b7ae9e109afc2ec738858c2755801dcfaa4b3
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/20544
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9741
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9741
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-28T12:47: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: 2
  additions: 72
  deletions: 0
  al: 1
apps:
  - Subcontracting
objects_touched:
  - key: codeunit/20544
    page: codeunit/20544
    type: codeunit
    id: 20544
    name: Subc. Transfer Line Ext.
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 638816
systems:
  - manufacturing
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9741 [Subcontracting] Bug 638816: Preserve Transfer WIP Item flag when toggling off Direct Transfer without a transit route

> Fixed a bug where toggling off Direct Transfer on a Subcontracting Transfer Order with a WIP item and no transfer route caused an error. The Transfer WIP Item flag is now properly preserved during the toggle operation.

[Pull request](https://github.com/microsoft/BCApps/pull/9741) · merged into `main` (BC30) on 2026-07-28 by ChethanT · 2 files (+72 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- The Transfer WIP Item flag was being reset when Direct Transfer was toggled off and no transfer route existed
- The fix restores the Transfer WIP Item field alongside other Subcontracting fields during the copy operation
- Previously added guard logic now correctly skips redundant re-validation in all toggle scenarios
- Added test case covering the scenario without a transit route
- Existing toggle tests continue to pass
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 20544 "Subc. Transfer Line Ext."](../../objects/codeunit/20544.md), Subcontracting: modified

## Context

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