What’s new in v18 AL – The Hacker Edition

In this video I poke around in dark places to look at what’s new with AL in Microsoft Dynamics 365 Business Central 2021 Wave 1.

https://youtu.be/aAfIZHgW5KI

In this video, Erik dives into what’s new in Business Central version 18 AL — but with a twist. Rather than just reviewing the official release notes, he decompiles the compiler DLLs (since they’re .NET) to discover hidden changes, new triggers, properties, and capabilities that Microsoft may not have fully documented yet. This is the “Hacker Edition” — a behind-the-scenes look at what’s actually changed in the AL language runtime.

The Official Release Notes — A Quick Overview

Before going behind the scenes, Erik runs through the officially announced changes for version 18’s modern development tools:

  • Adding keys to base tables — A very welcome addition for extension developers
  • Barcode font support — Barcode fonts are now installed on the SaaS service tier for use in reports. There’s a quirk though: the demo fonts you download for testing are named slightly differently than the production ones, requiring you to adjust names in your RDLC files (removing “Demo” and an “s”)
  • Interface improvements — Handling for scenarios where an enum implementing an interface is extended by something that’s no longer present. Interfaces can also now be marked as obsolete
  • Lookup improvements — Previously, lookups only returned a text value, which could be problematic when the value wasn’t unique. Now you can get the actual record back from a lookup
  • Returning complex types from functions — You can now return records from AL functions. Erik explains this was a leftover limitation from the C/SIDE to AL transition related to how the service tier handled records
  • New AL objects: Entitlement, Permission Set, and Permission Set Extension — This is a big deal both for managing permissions in AL and as a building block for AppSource monetization
  • Report Extensions — A major new capability
  • Extension validation and upgrade improvements

The Monetization Story

Erik highlights what he considers one of the most significant announcements buried in the documentation. The new entitlement and permission set objects are described as “building blocks envisioned to become the core building blocks in the story of monetizing AppSource apps.” Through these new AL objects, AppSource ISVs will be able to define which capabilities of their apps should be made available to users when customers purchase their app licenses.

This is critical because currently, with roughly 1,300 apps in AppSource, there are countless different approaches to monetization. Customers buying five apps might need to deal with five completely different payment models — some based on users, some on transactions, some on flat fees. A unified approach will be a major improvement.

Decompiling the Compiler — What’s Hidden in Version 18

Just as he did for version 17, Erik decompiled the AL compiler DLLs to find elements tagged with version markers. The version 18 runtime corresponds to runtime 7.0, as we can see in the app.json:

{
  "id": "fdac8d2d-1b60-4ad2-8854-728bd5c8495e",
  "name": "100in1version18",
  "publisher": "Default publisher",
  "version": "1.0.0.0",
  "brief": "",
  "description": "",
  "privacyStatement": "",
  "EULA": "",
  "help": "",
  "url": "",
  "logo": "",
  "dependencies": [],
  "screenshots": [],
  "platform": "1.0.0.0",
  "application": "18.0.0.0",
  "idRanges": [
    {
      "from": 50100,
      "to": 50149
    }
  ],
  "contextSensitiveHelpUrl": "https://100in1version18.com/help/",
  "showMyCode": true,
  "runtime": "7.0"
}

Between Version 17 and 18 (Runtime 6.x Updates)

Between versions, a few things were added in minor runtime updates:

  • Runtime 6.1 — An AllowScheduling property on XMLport
  • Runtime 6.2/6.3 — Page field and page part properties
  • Runtimes 6.4 through 6.6 — Nothing new tagged

Request Page Extension

As part of the report extensibility story, a report is actually two objects — the report itself and its request page. To properly extend a report, you also need to extend the request page. Version 18 introduces the Request Page Extension with triggers for OnOpenPage, OnClosedPage, OnAfterGetRecord, OnNewRecord, and OnInsertRecord. Here’s an example of a report extension with a request page:

reportextension 50123 "Multi Report" extends "Standard Sales - Invoice"
{
    requestpage
    {
        layout
        {
            addfirst(content)
            {
                field(LayoutCtl; Layout.Description)
                {
                    Caption = 'Selected Layout';
                    ApplicationArea = All;
                    Editable = false;
                }
            }
        }
    }

    var
        Layout: Record "Custom Report Layout";
}

New Trigger: OnAfterLookup

A new trigger called OnAfterLookup has been added, appearing in control extensions. This is likely related to the improved lookup functionality that now returns the actual record rather than just a text value.

Report Extension Triggers

Report extensions get OnPreReport and OnPostReport triggers, giving developers hooks into the report lifecycle from extension code.

Teaching Tips: AboutTitle and AboutText Properties

New properties AboutTitle and AboutText (with multi-language support) have been added to pages. These power the new “Teaching Tips” feature in Business Central. When enabled in user settings, pages display guided walkthroughs. For example, on the Users page, you’ll see a tooltip saying “About user accounts” with a description and options to “Learn more” (linking to docs.microsoft.com) or “Take tour” which walks through page elements step by step.

Report Extensible Property

Reports now have an Extensible property, mirroring what pages already had. Erik offers a word of caution: don’t set reports to non-extensible unless absolutely necessary, as it prevents partners from meeting customer requirements — just as non-extensible pages have been a pain point.

Teams as a Session Type

One of the more interesting discoveries: the internal session type enumeration now includes Teams alongside the existing types (Windows, Web, Tablet, Phone, OData, SOAP, NAS, Management, Desktop, Background Session, Child Session). Previously, the Teams integration was very limited. Recognizing Teams as a specific session type suggests Microsoft is building toward a much richer Teams experience in the future.

Improved Enum Value Navigation

Several missing combinations for navigating enum values — from name to number, from position to value, etc. — have been added, filling in gaps that existed previously.

Simplified UploadIntoStream

A new overload for UploadIntoStream removes the parameters that were only relevant for the Windows client and served no purpose in the web client. No more passing empty parameters for legacy compatibility.

IsReadOnly on Reports

You can now check whether a report is marked as read-only, allowing you to test the scope of a report programmatically.

StartSession with Timeout

The StartSession function gets a new overload with a fifth parameter: timeout. Previously, there were four parameters; now you can specify how long a background session should be allowed to run before timing out.

GetLastErrorText with GDPR Support

GetLastErrorText now has an ExcludeCustomerContent parameter. This is very useful in GDPR scenarios where you need to ensure that sensitive customer information isn’t being recorded in your error logs.

CreateTask with Timeout

Similar to StartSession, the CreateTask function also receives a new timeout parameter.

Selected Record on Lookup

The lookup trigger now includes a Selected parameter of record type, giving you direct access to the selected record — tying into the announced improvement for lookup functionality.

Source Code Examples

For reference, here’s a basic AL page extension — the classic “Hello World” starting point for any new AL project:

pageextension 50100 CustomerListExt extends "Customer List"
{
    trigger OnOpenPage();
    begin
        Message('App published: Hello world');
    end;
}

And here’s an example of a simple list page used for layout selection, demonstrating common page patterns in v18:

page 50123 "Select Layout"
{
    PageType = List;
    UsageCategory = None;
    SourceTable = "Custom Report Layout";
    Editable = false;
    layout
    {
        area(Content)
        {
            repeater(Rep)
            {
                field(Description; Description)
                {
                    ApplicationArea = all;
                }
            }
        }
    }
    actions
    {
        area(Processing)
        {
            action(EditLayout)
            {
                Caption = 'Edit Layouts';
                ApplicationArea = All;
                Image = DocumentEdit;
                ToolTip = 'Edit the report layouts';
                RunObject = Page "Custom Report Layouts";
                RunPageLink = "Report ID" = field("Report ID");
                Promoted = true;
                PromotedCategory = Process;
                PromotedIsBig = true;
                PromotedOnly = true;
            }
        }
    }
}

Summary

Version 18 brings a substantial set of changes to the AL language, both announced and hidden. The headline features — report extensions, returning complex types, improved lookups, and new permission/entitlement objects — are significant on their own. But the decompiled compiler reveals additional gems: Teams as a recognized session type (hinting at richer Teams integration), timeout parameters for StartSession and CreateTask, GDPR-friendly error text, simplified UploadIntoStream, teaching tip properties, and the new OnAfterLookup trigger. The entitlement system in particular signals a major shift toward unified AppSource monetization — something the entire partner ecosystem has been waiting for.