code change · performanceSales & Receivablesofficial - Microsoftreviewed - checked by Opus

#8553 [Bug][SubscriptionBilling]: Performance: Billing document creation does not scale to large datasets (4M+ subscription lines)

Billing document creation now scales to millions of subscription lines through code optimizations, database indexes, transaction checkpoints, and progress tracking, eliminating redundant lookups and event dispatch overhead.

Pull request · merged into main (BC30) on 2026-07-30 by miljance (community contribution) · 14 files (+770 -170), 14 AL · performance · tier official · reviewed (checked by Opus)

What changed

  • New Progress Tracker codeunit gives a reusable, GuiAllowed-guarded ETA dialog that is safe for Job Queue runs
  • Commit checkpoints added every 10 contracts in billing proposals and per document on the non-posting creation path; per-commitment commit removed in usage data billing
  • New subscriber codeunit skips redundant unit price and cost calculations when inserting billing document lines
  • Dictionary-based aggregation, SetLoadFields and IsEmpty checks replace costly loops and lookups
  • New or extended keys on Billing Line, Subscription Line, Usage Data Billing and Usage Data Generic Import; three event subscribers inlined into hot paths
  • 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).