code change · fixPurchasing & Payablesofficial - Microsoftreviewed - checked by Opus

#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 · 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

Context

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