#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.
- 28files
- 26AL files
- 2objects
Pull request · 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”, Base Application: modified
- Table 37 “Sales Line”, 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 (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).