---
id: change/bcapps/9195
type: change
title: "#9195 Fix Aged Accounts Receivable (Report 120) performance on large ledger history"
summary: The Aged Accounts Receivable report (Report 120) now reads only the four columns it needs from Detailed Cust. Ledg. Entry inside its per-row loop. This lowers the per-row SQL cost on databases with long ledger history.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - report aged accounts receivable
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:17.141Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 83c12f371e02cc5525811fa9947cbc9ca102ed73
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9195
    title: "microsoft/BCApps#9195: Fix Aged Accounts Receivable (Report 120) performance on large ledger history"
    date: "2026-07-09"
    commit: 83c12f371e02cc5525811fa9947cbc9ca102ed73
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/report/120
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9195
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9195
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-09T09:29:45Z"
author: ventselartur
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: performance
behavior_change: false
breaking: false
files:
  count: 3
  additions: 3
  deletions: 0
  al: 3
apps:
  - Base Application
objects_touched:
  - key: report/120
    page: report/120
    type: report
    id: 120
    name: Aged Accounts Receivable
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/ES/BaseApp/Sales/Reports/AgedAccountsReceivable.Report.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 640854
systems:
  - sales
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9195 Fix Aged Accounts Receivable (Report 120) performance on large ledger history

> The Aged Accounts Receivable report (Report 120) now reads only the four columns it needs from Detailed Cust. Ledg. Entry inside its per-row loop. This lowers the per-row SQL cost on databases with long ledger history.

[Pull request](https://github.com/microsoft/BCApps/pull/9195) · merged into `main` (BC30) on 2026-07-09 by ventselartur · 3 files (+3 -0), 3 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- SetLoadFields added to the Detailed Cust. Ledg. Entry loop for Entry Type, Posting Date, Amount and Amount (LCY)
- Reduces per-row SQL cost in a loop that scales with detailed ledger history
- Same change applied to the W1, ES and NA base layers

## AL objects touched

- [Report 120 "Aged Accounts Receivable"](../../objects/report/120.md), Base Application: modified
- `src/Layers/ES/BaseApp/Sales/Reports/AgedAccountsReceivable.Report.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#640854
- Systems: sales

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