#234 knowledge(ui): define per-record page outputs on every control-flow path
A new quality rule was added to detect when page outputs assigned conditionally in OnAfterGetRecord might retain values from previous records on skipped-assignment paths, with good and bad code examples.
- 5files
- 4AL files
- 0objects
Pull request · merged into main on 2026-11-06 by javiarmesto · 5 files (+172 -1), 4 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Requires per-record page outputs to be defined on every control-flow path through OnAfterGetRecord
- Covers list pages, part pages, and API page fields
- Accepts initial clearing, unconditional defaults, complete conditional assignments, and helper initialization
- Grounded in page-instance lifecycle documentation and Microsoft API patterns
- Good example demonstrates clearing and complete-assignment variants; bad example uses conditional lookup retention
AL objects touched
microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.md: added, not in the BC? snapshot yetmicrosoft/skills/review/al-ui-review.md: modified, not in the BC? snapshot
Context
- Systems: development
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).