#10509 [IRS Forms] Performance optimization
IRS 1099 form box calculation now queries detailed vendor ledger entries with a current key matching its equality filters and can filter payments by vendor. Profiling had shown one query taking most of a roughly 10-minute run; calculation results are unchanged.
- 1files
- 1AL files
- 1objects
Pull request · merged into main (BC30) on 2026-08-24 by dcenic · 1 file (+5 -3), 1 AL · performance · tier official · reviewed (checked by Opus)
What changed
- FindRelatedApplicationDetailedVendorLedgerEntries now uses the existing key Application No., Vendor No., Entry Type instead of Vendor Ledger Entry No., Entry Type
- FilterPaymentVendorLedgerEntries gets a VendorNo parameter and filters on Vendor No. when a specific vendor is requested
- No schema changes; existing keys are reused
- Single-vendor recalculations no longer enumerate payments for the whole period
- Performance gain still to be confirmed by re-profiling; existing tests cover the paths
AL objects touched
- Codeunit 10041 “IRS 1099 Form Box Calc. Impl.”, IRSForms (US layer): modified
Context
- Work items: AB#647491
- Labels: Team: Finance
- Systems: finance
- From the description: “Aligning the current key with those equality filters lets the optimizer satisfy the ordering with a selective index seek instead of a broad scan.”
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).