code change · featureAL Developmentofficial - Microsoftreviewed - checked by Opus

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