#10051 Bug 642053: [master] [Sustainability] Preview Posting Creates Gaps in Sustainability Ledger Entry Numbers
Preview posting of journal lines and documents that carry sustainability emissions no longer leaves gaps in Sustainability Ledger Entry numbers. Preview rows are now collected in memory under temporary numbers instead of being inserted, so no AutoIncrement identity is used. Normal posting is unchanged.
- 7files
- 3AL files
- 3objects
Pull request · merged into main (BC30) on 2026-08-19 by AleksanderGladkov · 7 files (+639 -6), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Preview posting collects sustainability ledger entries in memory instead of physically inserting them to avoid consuming AutoIncrement identity numbers
- Adds interception logic to shared insert operation to redirect preview rows to temporary storage
- Normal posting behavior remains unchanged and maintains sequential numbering
- Comprehensive regression tests verify entry number continuity across journal types including general journal, purchase credit memo, recurring journals, and fixed asset journals
- Multiple preview operations no longer burn entry numbers
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6233 “Sust. Preview Post Instance”, Sustainability: modified
- Codeunit 6228 “Sust. Preview Posting Handler”, Sustainability: modified
- Codeunit 6212 “Sustainability Post Mgt”, Sustainability: modified
Context
- Work items: AB#642053
- Labels: AL: Apps (W1), Team: Finance
- Systems: sustainability, development
- From the description: “Preview no longer inserts real Sustainability Ledger Entries.”
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).