---
id: change/bcquality/216
type: change
title: "#216 knowledge(style): a new procedure that changes the page's current record should take it as var Record"
summary: New style guidance document for AL developers on when procedures that modify a record should take the record as a var parameter, with good and bad code samples and exclusions.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:02.004Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b503249751e2594b10627db77eba3a3e2c94a176
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/216
    title: "microsoft/BCQuality#216: knowledge(style): a new procedure that changes the page's current record should take it as var Record"
    date: "2026-10-05"
    commit: b503249751e2594b10627db77eba3a3e2c94a176
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 216
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/216
kind: pr
base_branch: main
major: null
merged_at: "2026-10-05T12:42:22Z"
author: MichaelDieringer
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 5
  additions: 192
  deletions: 1
  al: 4
apps: []
objects_touched: []
objects_unjoined:
  - path: microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/skills/review/al-style-review.md
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
quote: null
joined_against:
  major: null
  commit: null
---

# #216 knowledge(style): a new procedure that changes the page's current record should take it as var Record

> New style guidance document for AL developers on when procedures that modify a record should take the record as a var parameter, with good and bad code samples and exclusions.

[Pull request](https://github.com/microsoft/BCQuality/pull/216) · merged into `main` on 2026-10-05 by MichaelDieringer · 5 files (+192 -1), 4 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Added knowledge article about mutating procedures on pages should accept records as var parameters
- Explains how passing records by value causes stale data issues when pages modify records through procedures
- Documents cost and constraints of var parameters including filter preservation requirements
- Lists exclusions such as job queue entry points, API actions, and record ID based procedures
- Integrated into style review checklist and test fixtures

## AL objects touched

- `microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/style/mutating-procedure-for-a-page-caller-takes-var-record.md`: added, not in the BC? snapshot yet
- `microsoft/skills/review/al-style-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).
