What’s new in AL for Business Central 2024 Wave 1 – The Hacker Edition

It’s that time of the year again, a new Business Central release is released and again, I’ll take a look at all the goodies we get to play with. Check out the video:

https://youtu.be/AstxnbhqOYg

In this video, Erik walks through everything new in AL for Business Central 2024 Wave 1 (version 24 / compiler version 13) — the “Hacker Edition.” He covers the major language features, quality-of-life improvements, and even dives into the compiler with a .NET decompiler to see if Microsoft missed documenting anything. Let’s break it all down.

Version Numbering Confusion

Before diving into the features, Erik clears up the perpetually confusing version numbering situation:

  • Marketing label: “2024 Wave 1”
  • Business Central version: Version 24 (incrementing since version 1 back in 1995)
  • AL compiler version: Version 13 (since the AL compiler started with NAV 2018, which you can think of as version zero)

The compiler version 13 dropped before April 1st, and Erik decided to dive into it immediately. He notes that the AL Language extension in VS Code shows version 13.0, released as the regular (non-pre-release) version.

Using the Change Log

Rather than relying solely on the official docs page, Erik points out that the compiler team at Microsoft has gotten very good at maintaining a detailed change log — probably because they’ve noticed Erik routinely fires up a .NET decompiler at the end of these videos to find anything they forgot to mention.

Self-Extending Tables: Extensions to the Same Target in the Same App

This is arguably the biggest feature in this release. You can now create a table extension object that extends a table within the same app. Previously, table extensions could only target tables in other apps.

What does this mean in practice?

  • If you have an app with a table and you need extra fields for a soft module, you can now create a table extension in the same app rather than splitting it into a multi-app architecture.
  • It’s syntactical sugar — under the hood, if the app owns the base table and extends it, it will still be one table in SQL. No performance penalty from separate extension tables.
  • Many partners have built huge, complicated multi-app setups that led to bad performance and weird complexities. This feature allows you to consolidate: “this customer needs this module, that module, and that module” — and you can build it all as one app in source.

Erik sees this as a huge win for better code organization, similar to the concept of sub-modules or feature branches you pull in. He had asked for this feature years ago and was told no (with a smile). Now it’s here.

Important Rules

  • The base object cannot reference members from its extension objects. For example, if you have “Unit Price” on the base table, “Quantity” in one table extension, and “Line Amount” in another — code on the “Unit Price” trigger cannot see the “Quantity” field.
  • Extension objects can reference members from other extension objects in the same app, but only if the other extension object has a lower object ID. So in the world of “we want to get rid of object numbers,” we just became even more dependent on them.

AL Table Proxy Generator Changes

The altpgen executable used to ship with a built-in app registration for CRM/Dynamics 365 Sales. That’s no longer the case — you now have to create your own app registration and use that instead of relying on Microsoft’s.

Relative Paths in Control Add-ins

Script, CSS, and image paths on control add-ins can now be relative to the control add-in source file. Previously, you had to specify the entire path, which was annoying — especially when reusing code across different folder structures. This is a welcome quality-of-life improvement.

New “Create AL Project” Button

A new button for creating AL projects has been added in VS Code, making it easier to locate for first-time users. It does the exact same thing as the existing command palette approach — it’s just more discoverable. As Erik notes, “it’s not like this is a crowded area anyway.”

Isolated Storage + Secret Text

New method overloads for isolated storage now support the Secret Text type. Since isolated storage is where you store your secrets, and Secret Text is the type designed for handling sensitive data, this integration is a natural and necessary addition.

AL-Doc Improvements

AL-Doc continues to improve with support for overriding files and the ability to update or augment generated documentation by including Markdown files during build. Summaries can now be added during the AL-Doc build process for various object types including enums.

Debugging Support Dropped for Versions Below 20

This is a significant breaking change: support has ended for debugging Business Central server versions less than 20. On-premises servers released before the April 2022 release (version 20) cannot be debugged with AL extension package versions 13 or greater.

If you’re on version 19 or older, you’ll need to manually install and maintain an older version of VS Code locked to the older compiler. This won’t affect cloud customers (who are always on the newest version), but it will make some on-premises users unhappy.

Using Statement Folding

A new editor setting, “folding imports by default”, can collapse all using statements when a file is opened. With the namespace feature introduced in 2023, files can accumulate significant noise at the top — Erik showed an example with 61 lines of using statements. This folding feature helps keep things manageable.

Disable Read Keys in Transactions (On-Prem)

A new AL Database API allows you to disable read keys within the current transaction. Erik notes this is an on-premises-only feature, so he doesn’t dwell on it.

Tooltips on Table Fields

This is one of the top three most important changes in this release. You can now specify the tooltip property directly on table fields, similar to the caption property. The tooltip defined at the table level will be shown on fields unless a page-level tooltip overrides it. This is a huge time-saver — no more duplicating tooltip text across every page that uses a field.

File Uploads and Drag & Drop

A new action type supports uploading multiple files and drag-and-drop functionality. However, Erik has strong opinions about Microsoft’s implementation:

  • The current approach requires clicking to activate a drop zone, which defeats the purpose of drag and drop.
  • Erik’s preferred approach (which he uses in his SharePoint connector) assigns a visible part of the UI — like a FactBox — as the drop zone, so users can just drop without any preparatory clicks.
  • The extra click to activate the drop zone adds friction to both drag-and-drop users and file-selection users.

Placeholder Text on Page Fields

A nice UX bonus: you can now add placeholder text to page fields. When a field is empty, gray placeholder text appears inside it (similar to how web forms work). This is supported for text, big text, code, and grid fields.

Erik points out an interesting design implication: in many cases, placeholder text can eliminate the need for a caption, saving screen real estate. For example, an address field with a value is self-explanatory; when empty, the placeholder “Address” communicates the same thing a caption would.

Decimal fields aren’t supported yet because of the ambiguity between zero and empty.

Prompt Guide and Prompt Actions for Copilot

The new Prompt Guide feature lets you define a list of predefined text prompts for Copilot prompt dialogues. This is the natural evolution after the initial Copilot rollout — users realized that writing effective prompts from scratch is time-consuming. Now developers can provide ready-made prompts that users simply select.

Prompt actions are rendered as a floating bar in the UI, and Erik notes this area is getting a lot of attention from Microsoft.

New Cookie Data Type

Cookies are still essential for authentication, and communicating with certain web services without cookie support was annoying. The HTTP client now has full cookie support with cookie content available on both response and request messages. The decompiler confirmed GetCookie, SetCookie, and RemoveCookie methods on the HTTP request message type, plus GetCookie on responses and UseResponseCookies on the HTTP client class.

Bug Fixes and Miscellaneous

Query Usage Category Fix

Erik’s biggest issue with version 23 has been fixed. When version 23 introduced queries in the UI with analysis views and usage categories, he built query support into the Simple Object Designer so users could create queries that appeared in Tell Me. But they never showed up — it turned out to be a bug that required objects to be recompiled, and Microsoft never backported the fix to version 23. It’s now fixed in version 24.

Lists of InStream and OutStream

You can now create lists of InStream and OutStream. Erik tested this live and confirmed it works, but also checked his most-wanted feature — a dictionary with RecordRef as a value type — which still doesn’t work:

// This now works in version 13:
var myList: List of [InStream];

// This also works:
var myDict: Dictionary of [Code[20], InStream];

// This still does NOT work (Erik's most wanted):
var myDict: Dictionary of [Code[20], RecordRef];

Other Notable Items

  • New functions on the Number Series functionality
  • LogInternalError is now obsoleted — use Session.LogMessage instead
  • AlterKey function on the Database class
  • New trigger for file upload actions

The Decompiler Check

Erik ran the compiler through his usual .NET decompiler to search for anything tagged with version 13.0. The results were pretty consistent with the documented change log — a sign that Microsoft’s documentation is getting more thorough. “Maybe next time I don’t even need to do this,” Erik says, though he admits he’s said that before and always ends up doing it anyway.

Looking at the App Configuration

The sample project’s app.json shows how the runtime version controls which language features are available:

{
  "id": "27b30fa5-54ff-41af-9ef5-bcd41dfc5377",
  "name": "WhatsNewinBC25",
  "publisher": "Default Publisher",
  "version": "1.0.0.0",
  "dependencies": [],
  "platform": "1.0.0.0",
  "application": "25.0.0.0",
  "idRanges": [
    {
      "from": 50100,
      "to": 50149
    }
  ],
  "resourceExposurePolicy": {
    "allowDebugging": true,
    "allowDownloadingSource": true,
    "includeSourceInSymbolFile": true
  },
  "runtime": "14.1",
  "features": [
    "NoImplicitWith"
  ]
}

The runtime property determines which AL language features and functions are available. Setting it to an older version (like "9.0") restricts you to only the features that existed at that time — for example, the resourceExposurePolicy section didn’t exist in runtime version 4. Everything in the compiler is tagged with the version it became available, which is exactly what Erik exploits when searching for 13.0 in the decompiler.

Erik’s Wish List

Erik closes with his standing wish: partial codeunits. Not codeunit extensions (which are a different concept), but the ability to split a single codeunit across multiple files — similar to C#’s partial classes. Some of his apps have codeunits with 3,000–5,000 lines of code that share the same fields and context, and splitting them into separate codeunits is painful. Working with files that large makes everything sluggish. Partial codeunits would solve this elegantly.

Summary

Business Central 2024 Wave 1 brings a solid set of improvements to the AL language. The standout features are self-extending tables (allowing table extensions within the same app), tooltips on table fields, and the continued maturation of Copilot with prompt guides. Quality-of-life improvements like placeholder text, relative paths in control add-ins, using statement folding, cookie support, and multi-file uploads round out a meaningful release. The dropping of debugger support for pre-version-20 servers is worth noting for anyone still maintaining older on-premises installations.