code change · fixAL Developmentofficial - Microsoftreviewed - checked by Opus

#10210 [Bug][Subscription Billing] "Delete Invoiced Sales Orders" leaves orphaned Sales Subscription Lines behind

Fixed orphaned Sales Subscription Lines left behind by "Delete Invoiced Sales Orders" and "Delete Invd Blnkt Sales Orders" reports by adding event subscribers and batch deletion procedures on the Sales Header table extension.

Pull request · merged into main (BC30) on 2026-10-02 by miljance (community contribution) · 4 files (+234 -13), 3 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Added two event subscribers in Sales Subscription Line Mgmt. so the Delete Invoiced Sales Orders and Delete Invd Blnkt Sales Orders reports also delete Sales Subscription Lines
  • Report 299 cleanup hooks OnAfterDeleteSalesLinesLoop so lines are removed even when a Charge (Item) line keeps the order
  • New public DeleteSalesServiceCommitments() on the Sales Header extension batch-deletes a document’s subscription lines and is shared by both reports, Sales-Post and Sales-Quote to Order
  • DeleteSalesServiceCommitment on Sales Line and the new header procedure are public with XML documentation for external callers
  • Three new tests cover invoiced orders, blanket orders and posting
  • Behaviour changes for users or extensions.

AL objects touched

Also merged into

  • #12287 into releases/29.x on 2026-10-06

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