---
id: change/bcapps/10063
type: change
title: "#10063 Fix the shadowed header cache in reminder line GetCurrencyCodeFromHeader"
summary: Fixed a variable shadowing bug in GetCurrencyCodeFromHeader() on reminder and issued reminder line tables that caused the header to be re-read from the database on every single call instead of using the cache. Table 298 uses a simple deletion of the shadowing local, while table 296 adds a dedicated global to avoid breaking an existing cache contract.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table issued reminder line
  - table reminder line
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-12-06T00:54:11.813Z"
  flags: []
generated:
  at: "2026-12-06T00:14:19.053Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: fa4df0a44634c5bb4c96993264a1810c52b7b1c8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10063
    title: "microsoft/BCApps#10063: Fix the shadowed header cache in reminder line GetCurrencyCodeFromHeader"
    date: "2026-12-05"
    commit: fa4df0a44634c5bb4c96993264a1810c52b7b1c8
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/298
    - object/table/296
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/reports/report-117
      title: Reminder report
      label: possibly related
      why: touches Table 298 "Issued Reminder Line"
      by: code
number: 10063
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10063
kind: pr
base_branch: main
major: "30"
merged_at: "2026-12-05T17:56:16Z"
author: Franco111000
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: false
breaking: false
files:
  count: 9
  additions: 35
  deletions: 38
  al: 9
apps:
  - Base Application
objects_touched:
  - key: table/298
    page: table/298
    type: table
    id: 298
    name: Issued Reminder Line
    app: Base Application
    status: modified
  - key: table/296
    page: table/296
    type: table
    id: 296
    name: Reminder Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/ES/BaseApp/Sales/Reminder/ReminderLine.Table.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues:
  - 8850
work_items:
  - 656779
systems:
  - sales
quote: null
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #10063 Fix the shadowed header cache in reminder line GetCurrencyCodeFromHeader

> Fixed a variable shadowing bug in GetCurrencyCodeFromHeader() on reminder and issued reminder line tables that caused the header to be re-read from the database on every single call instead of using the cache. Table 298 uses a simple deletion of the shadowing local, while table 296 adds a dedicated global to avoid breaking an existing cache contract.

[Pull request](https://github.com/microsoft/BCApps/pull/10063) · merged into `main` (BC30) on 2026-12-05 by Franco111000 (community contribution) · 9 files (+35 -38), 9 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- A local record shadowed the global in GetCurrencyCodeFromHeader(), so the cache check never matched and the header was read on every call
- The procedure is the AutoFormatExpression for amount fields and report columns (about 230 usages in 26 files)
- Table 298 Issued Reminder Line simply drops the shadowing local so the existing global cache works
- Table 296 Reminder Line gets a separate CurrencyCodeReminderHeader global so the shared ReminderHeader cache used by GetReminderHeader() is not affected
- Displaying a reminder with N lines no longer needs roughly 4N header reads

## AL objects touched

- [Table 298 "Issued Reminder Line"](../../objects/table/298.md), Base Application: modified
- [Table 296 "Reminder Line"](../../objects/table/296.md), Base Application: modified
- `src/Layers/ES/BaseApp/Sales/Reminder/ReminderLine.Table.al`: modified, not in the BC30 snapshot

## Context

- Fixes: [#8850 [Bug]: Issued/Reminder Line GetCurrencyCodeFromHeader()](https://github.com/microsoft/BCApps/issues/8850) (closed)
- Work items: AB#656779
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: sales

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Reminder report](https://learn.microsoft.com/dynamics365/business-central/reports/report-117) — possibly related: touches Table 298 "Issued Reminder Line"

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