community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

BC Friday Tips #83 Check Whether a Record Has Changed

The Record.IsDirty() method detects whether a record has been modified without requiring manual tracking. This pattern simplifies code when applying multiple field updates to a record.

post That NAV Guy

Teddy Herryanto · 2026-10-02 · 124 words · about 1 min

"Record.IsDirty() is available from runtime 18, which is BC 29."

Key points

  • Record.IsDirty() automatically tracks changes to any field on a record
  • Eliminates the need to maintain a separate IsModified Boolean variable
  • Available from runtime 18 (BC 29); use RecordRef.IsDirty() for earlier versions
  • Reduces code complexity when validating and modifying multiple fields

Quotes

  • “Record.IsDirty() is available from runtime 18, which is BC 29.” (Identifies the version availability of this feature for developers to determine compatibility with their systems)
  • “No need to maintain an IsModified Boolean yourself.” (Highlights the key benefit of reducing boilerplate code and manual state management)

Context

  • Features: Record.IsDirty(), RecordRef.IsDirty(), Validate method, Modify method
  • Versions: BC 29, runtime 18

Source: That NAV Guy, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.