---
id: change/bcapps/9084
type: change
title: "#9084 Bug 640321: Blanket Purch. Order to Order drops extended text for later items"
summary: Fixes a bug where extended text lines are dropped when converting blanket purchase orders to regular orders if parent items end up on different line numbers. The fix remaps attached line references before insertion.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit blanket purch. order to order
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:20.864Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a3196f625c7a132b53e8e2f5be357d37a8d421ce
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9084
    title: "microsoft/BCApps#9084: Bug 640321: Blanket Purch. Order to Order drops extended text for later items"
    date: "2026-07-09"
    commit: a3196f625c7a132b53e8e2f5be357d37a8d421ce
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/97
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9084
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9084
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-09T12:27:45Z"
author: alexei-dobriansky
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 6
  additions: 357
  deletions: 0
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/97
    page: codeunit/97
    type: codeunit
    id: 97
    name: Blanket Purch. Order to Order
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/NA/BaseApp/Purchases/Document/BlanketPurchOrdertoOrder.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 640321
systems:
  - purchasing
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9084 Bug 640321: Blanket Purch. Order to Order drops extended text for later items

> Fixes a bug where extended text lines are dropped when converting blanket purchase orders to regular orders if parent items end up on different line numbers. The fix remaps attached line references before insertion.

[Pull request](https://github.com/microsoft/BCApps/pull/9084) · merged into `main` (BC30) on 2026-07-09 by alexei-dobriansky · 6 files (+357 -0), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Extended text lines were being skipped during blanket-to-order conversion when parent items moved to different line numbers
- Added RemapAttachedToLineNo function to rewrite line number references before insertion checks
- Solution mirrors an existing fix on the sales side
- Includes test coverage for the scenario
- Changes propagated across IT, NA, and W1 layers
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 97 "Blanket Purch. Order to Order"](../../objects/codeunit/97.md), Base Application: modified
- `src/Layers/NA/BaseApp/Purchases/Document/BlanketPurchOrdertoOrder.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#640321
- Labels: Team: SCM
- Systems: purchasing

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