---
id: change/bcapps/9688
type: change
title: "#9688 [main] Hidden breaking change and instability on sales/purchase line insert"
summary: Makes the v28 check that blocks inserting sales and purchase lines without an existing header more reliable, since it raised false-positive errors. The suppress switch is renamed, a SetSuppress...ExistsVerification procedure is added, the header is checked with an explicit Get, and temporary lines skip the check.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table purchase line
  - table sales line
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:35.207Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: e4bd629d1f4ff5d30d06be8d5a70cdda9708a05a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9688
    title: "microsoft/BCApps#9688: [main] Hidden breaking change and instability on sales/purchase line insert"
    date: "2026-08-04"
    commit: e4bd629d1f4ff5d30d06be8d5a70cdda9708a05a
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/39
    - object/table/37
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9688
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9688
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-04T13:03:35Z"
author: JakovljevicDusan
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 28
  additions: 1279
  deletions: 287
  al: 26
apps:
  - Base Application
objects_touched:
  - key: table/39
    page: table/39
    type: table
    id: 39
    name: Purchase Line
    app: Base Application
    status: modified
  - key: table/37
    page: table/37
    type: table
    id: 37
    name: Sales Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues:
  - 9566
work_items:
  - 643231
systems:
  - purchasing
  - sales
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9688 [main] Hidden breaking change and instability on sales/purchase line insert

> Makes the v28 check that blocks inserting sales and purchase lines without an existing header more reliable, since it raised false-positive errors. The suppress switch is renamed, a SetSuppress...ExistsVerification procedure is added, the header is checked with an explicit Get, and temporary lines skip the check.

[Pull request](https://github.com/microsoft/BCApps/pull/9688) · merged into `main` (BC30) on 2026-08-04 by JakovljevicDusan · 28 files (+1279 -287), 26 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Sales Line variable HasSalesHeader renamed to SuppressSalesHeaderExistsVerification to show it is a skip switch
- New SetSuppressSalesHeaderExistsVerification() so the switch can be set without SetSalesHeader()/ClearSalesHeader()
- VerifySalesHeaderExists() now uses an explicit SalesHeader.Get() instead of GetSalesHeader()
- Verification is skipped for temporary lines; OnBeforeGetSalesHeader keeps its HasSalesHeader parameter name
- Purchase Line receives the symmetrical changes; tests updated in SCM Orders VI
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 39 "Purchase Line"](../../objects/table/39.md), Base Application: modified
- [Table 37 "Sales Line"](../../objects/table/37.md), Base Application: modified
- `src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al`: modified, not in the BC30 snapshot

## Context

- Fixes: [#9566 [Bug]: Regression/destructive with Sales Line / Purchase Line insert](https://github.com/microsoft/BCApps/issues/9566) (closed)
- Work items: AB#643231
- Labels: Team: SCM
- Systems: purchasing, sales

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