Business Central v29 continues its streak of small-but-mighty developer improvements, and one of my favorites this cycle is the new IsDirty() flag on records. It’s simple, it’s elegant, and it solves a problem every AL developer has bumped into at least once: “Did this record actually change?”
If you’ve ever built validation logic, sync jobs, audit trails, or conditional writes, you’ve probably ended up with some combination of temp records, manual comparisons, or “just write it again and hope it’s fine.” BC v29 finally gives us a proper, built‑in way to detect whether a record’s contents have changed; without the hacks.
What IsDirty() Actually Does
The new IsDirty() method lets you check whether a record has been modified since it was retrieved or last written. It’s Business Central’s way of saying:
“Hey, something in this record is different now.”
This includes field changes, assignments, and modifications made through AL code. If the record is untouched, IsDirty() returns false. If anything has changed, you get true.
It’s the kind of feature that feels obvious in hindsight; but until now, we didn’t have it.
Why This Matters
1. Cleaner Validation Logic
Instead of comparing fields manually or storing a temp copy, you can simply check:
if Rec.IsDirty() then
// do something meaningful
2. Smarter Write Operations
Avoid unnecessary Modify() calls when nothing changed; especially useful in high‑volume or integration-heavy extensions.
3. Better Sync and Telemetry
If you’re pushing data to external systems, you can skip the noise and only sync when the record actually changed.
4. More Reliable User Interaction Checks
Ever needed to know whether the user actually touched the record? Now you can.
Examples
Here is an example of the “old” way of managing a dirty monitor.
procedure SetStartDate()
var
RecDirty: Boolean;
begin
RecDirty := false;
if Rec.ARD_StartDate = 0D then begin
Rec.ARD_StartDate := WorkDate();
RecDirty := true;
end;
if RecDirty then
Rec.Modify();
end;
This is a short example, but if there were many “might edit the record” conditions then tracking and maintaining a Dirty Flag like this could be a pain.
Now with the IsDirty Flag.
procedure SetStartDate()
begin
if Rec.ARD_StartDate = 0D then
Rec.ARD_StartDate := WorkDate();
if Rec.IsDirty() then
Rec.Modify();
end;
That is much cleaner and easier to read as well as less maintenance.
How IsDirty() Fits Into the Existing Record Flags
IsDirty() now joins two other small-but-essential record flags that AL developers rely on: IsEmpty() and IsTemporary(). Together, these three give you a quick, expressive way to understand a record’s state without extra boilerplate.
IsEmpty()tells you whether the record actually contains data.IsTemporary()tells you whether the record lives only in memory.IsDirty()now tells you whether the record has been changed since it was loaded.
It’s a simple trio, but it covers three of the most common questions developers ask when working with records: Does it exist? Where does it live? Did anything change? BC v29 finally completes that picture.
Aardvark Labs Takeaway
IsDirty() is one of those features that doesn’t make a splashy headline, but quietly improves the daily life of every AL developer. It’s the kind of quality-of-life upgrade that makes Business Central feel more modern, more predictable, and more fun to build on.
BC 29 is full of these little gems; and we’re here for all of them.




Leave a Reply