---
id: change/bcquality/234
type: change
title: "#234 knowledge(ui): define per-record page outputs on every control-flow path"
summary: 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.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-11-08T00:58:59.369Z"
  flags: []
generated:
  at: "2026-11-08T00:19:04.246Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: cc5d31165afc549b1368ed64676946283eba7fbc
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/234
    title: "microsoft/BCQuality#234: knowledge(ui): define per-record page outputs on every control-flow path"
    date: "2026-11-06"
    commit: cc5d31165afc549b1368ed64676946283eba7fbc
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines:
    - guideline/microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord
    - guideline/microsoft/skills/review/al-ui-review
  changes: []
number: 234
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/234
kind: pr
base_branch: main
major: null
merged_at: "2026-11-06T11:18:05Z"
author: javiarmesto
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 5
  additions: 172
  deletions: 1
  al: 4
apps: []
objects_touched: []
objects_unjoined:
  - path: microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/skills/review/al-ui-review.md
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
quote: null
joined_against:
  major: null
  commit: null
---

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

[Pull request](https://github.com/microsoft/BCQuality/pull/234) · 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 yet
- `microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.good.al`: added, not in the BC? snapshot yet
- [`microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.md`](../../guidelines/microsoft/knowledge/ui/reset-per-row-page-variables-in-onaftergetrecord.md): added, not in the BC? snapshot yet
- [`microsoft/skills/review/al-ui-review.md`](../../guidelines/microsoft/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).
