#205 Preserve business filters when recommending Record.Get
The performance guidance for replacing FindFirst with Record.Get now clarifies that additional business filters must be preserved, either by keeping the filtered FindFirst or by enforcing equivalent conditions after Get.
- 4files
- 3AL files
- 0objects
Pull request · merged into main on 2026-10-02 by demiliani · 4 files (+44 -5), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Guidance still recommends Get for lookups filtered only on the full primary key
- Notes that Record.Get ignores normal record filters, so a SetRange before Get does not keep a business condition
- Two valid alternatives: keep the filtered FindFirst, or check the condition explicitly after a successful Get
- FindFirst with an extra required filter is no longer flagged as a defect, avoiding false-positive review advice
- Bad and good samples extended with a Blocked filter example, and the article added to the performance evaluation fixtures
AL objects touched
microsoft/knowledge/performance/use-get-instead-of-findfirst-on-full-primary-key.bad.al: modified, not in the BC? snapshotmicrosoft/knowledge/performance/use-get-instead-of-findfirst-on-full-primary-key.good.al: modified, not in the BC? snapshotmicrosoft/knowledge/performance/use-get-instead-of-findfirst-on-full-primary-key.md: modified, not in the BC? snapshot
Context
- Systems: development, platform
Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).