#9950 [Master] - Bug 645038 Withholding Tax entries from a previous posting preview appear on unrelated documents (e.g. expense report)
Withholding Tax entries from a previous posting preview no longer leak into unrelated document previews. The fix clears temporary WHT entries at the start of each preview instead of only during actual posting.
- 1files
- 1AL files
- 1objects
Pull request · merged into main (BC30) on 2026-08-11 by v-rohangarg20 · 1 file (+2 -18), 1 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Fixed bug where stale Withholding Tax entries from one preview appeared when previewing an unrelated document
- Root cause was that temporary entries were only cleared on actual posting, not on preview operations
- Solution clears the temporary Withholding Tax buffer at the start of every preview operation
- Removed subscribers from OnBeforePostPurchaseDoc and OnBeforeGenJnlDoc events
- Cleaned up unused imports after refactoring
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6792 “Wthldg Tax Preview Handler”, WithholdingTax: modified
Context
- Work items: AB#645038
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: “temporary Withholding Tax entries were only cleared from subscribers tied to actual posting”
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).