---
id: change/bcapps/13641
type: change
title: "#13641 Bug 647022: [Subcontracting] Use alternative worksheet names and migrate the legacy page"
summary: Subcontracting initialization now preserves existing customer templates and uses alternative worksheet names when the default SUBCONTR name is unavailable, while migrating the legacy page ID only from the old Subcontracting Worksheet.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit subc. req wksh templ upgrade
  - codeunit subc. upgrade tag def. ext.
  - codeunit subcontracting comp. init.
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-11-12T00:55:54.837Z"
  flags: []
generated:
  at: "2026-11-30T00:15:18.424Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 35bf4a5aa50150e578547f2706894ba8f6fc9d35
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13641
    title: "microsoft/BCApps#13641: Bug 647022: [Subcontracting] Use alternative worksheet names and migrate the legacy page"
    date: "2026-11-11"
    commit: 35bf4a5aa50150e578547f2706894ba8f6fc9d35
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/20572
    - object/codeunit/20570
    - object/codeunit/20503
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/production-how-to-subcontract-manufacturing
      title: Subcontracting overview
      label: possibly related
      why: Documents subcontracting worksheet usage and legacy page migration.
      by: model
number: 13641
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13641
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-11T12:03:34Z"
author: ChethanT
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: 6
  additions: 684
  deletions: 7
  al: 3
apps:
  - Subcontracting
objects_touched:
  - key: codeunit/20572
    page: codeunit/20572
    type: codeunit
    id: 20572
    name: Subc. Req Wksh Templ Upgrade
    app: Subcontracting
    status: modified
  - key: codeunit/20570
    page: codeunit/20570
    type: codeunit
    id: 20570
    name: Subc. Upgrade Tag Def. Ext.
    app: Subcontracting
    status: modified
  - key: codeunit/20503
    page: codeunit/20503
    type: codeunit
    id: 20503
    name: Subcontracting Comp. Init.
    app: Subcontracting
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 647022
systems:
  - manufacturing
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13641 Bug 647022: [Subcontracting] Use alternative worksheet names and migrate the legacy page

> Subcontracting initialization now preserves existing customer templates and uses alternative worksheet names when the default SUBCONTR name is unavailable, while migrating the legacy page ID only from the old Subcontracting Worksheet.

[Pull request](https://github.com/microsoft/BCApps/pull/13641) · merged into `main` (BC30) on 2026-11-11 by ChethanT · 6 files (+684 -7), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Prevents silent replacement of non-Subcontracting templates named SUBCONTR by preserving customer templates
- Generates alternative names (SUBCONTR1, SUBCONTR2, etc.) within 10-character limit when default name is unavailable
- Migrates Page ID only from the legacy Subcontracting Worksheet (99000886) to the new worksheet
- Reuses existing Subcontracting-type templates before creating new ones, preventing duplicates on repeated initialization
- Maintains existing template identity, descriptions, recurring settings, and batch configurations except for explicit legacy page migration
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 20572 "Subc. Req Wksh Templ Upgrade"](../../objects/codeunit/20572.md), Subcontracting: modified
- [Codeunit 20570 "Subc. Upgrade Tag Def. Ext."](../../objects/codeunit/20570.md), Subcontracting: modified
- [Codeunit 20503 "Subcontracting Comp. Init."](../../objects/codeunit/20503.md), Subcontracting: modified

## Context

- Work items: AB#647022
- Labels: AL: Apps (W1), Team: SCM
- Systems: manufacturing

## Possibly related

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

- [Subcontracting overview](https://learn.microsoft.com/dynamics365/business-central/production-how-to-subcontract-manufacturing) — possibly related: Documents subcontracting worksheet usage and legacy page migration. (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).
