community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Record.IsDirty in Business Central 29: a worked example

Record.IsDirty() is a new API in Business Central 29 that lets AL code check whether a record instance has changed since it was loaded, eliminating the need to manually track change state. It returns true when in-memory values differ from the database and false when they match.

post Mohana's Dynamics NAV & BC blog

Mohana Yadav · 2026-10-02 · 371 words · about 2 min

"Record.IsDirty() tells you whether a record instance has changed since it was loaded."

Key points

  • Record.IsDirty() returns true when in-memory values differ from what came back from the database, false when they still match
  • This capability existed for RecordRef since runtime 5.0 but is now available directly on the Record data type in version 29
  • Developers can use it to decide whether a record needs validating, saving, or user prompts without manual state tracking
  • Requires runtime 18.0 or later; compiling against runtime 17.0 produces diagnostic AL0666

Quotes

  • “Record.IsDirty() tells you whether a record instance has changed since it was loaded.” (This is the core capability that solves the problem of detecting changes without manual state tracking)
  • “Set runtime to 18.0 or later in app.json before you build it.” (Critical technical requirement; failure to follow this prevents the feature from working)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

Context

  • Features: Record.IsDirty(), change state detection, record validation, runtime 18.0 support
  • Versions: 29, 2026 release wave 2

Source: Mohana’s Dynamics NAV & BC blog, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.