Hey there! Ready to dive into the latest updates to the AL language in Business Central?
This post will give you a rundown of the key updates, complete with practical examples and insights. Whether you’re a seasoned AL developer or just starting out, there’s something here for everyone. Let’s get started!
Table of contents
Moving Fields and Tables Between Applications
Remember the buzz about moving fields and tables between applications? Well, it’s back and better than ever! This release opens up the use of the MoveTo
and MoveFrom
properties on tables and fields, giving you the power to move your data elements between different applications.
These properties make it easy to shuffle things around. For example, if you have a field in one app that really belongs in another, you can simply use the MoveTo
property to relocate it. It’s like packing up your digital belongings and moving them to a new home!
Why is this so cool? Because it helps you:
- Centralize your data for better consistency.
- Organize your code into more manageable modules.
Resources in Apps: Enhanced Functionality
Good news: resources in apps are now open for everyone to use! Plus, there have been some cool additions that make working with resources even better.
First things first, you need to specify a resource root folder in your app.json
file. This tells Business Central where to find your resource files.

Now, how do you actually use these resources? You reference them by their full name, including the path from the resource root folder. Some examples:
Listing Resources
Here’s an example:
NavApp.ListResources('SpaceX/*.txt');
Get Resource as Text
Here’s an example:
Text := NavApp.GetResourceAsText('MyResource.txt', TextEncoding::UTF8);
Get Resource as JSON
Here’s how it works:
JsonObject := NavApp.GetResourceAsJson('MyJsonFile.json', TextEncoding::UTF8);
Using Get Resource with Streams
Here’s an example:
NavApp.GetResource('MyFile.txt', stream);
It’s important to know the limits when working with resources. Here’s a rundown of the updated limitations:
- Single resource size: 16 MB
- Total size of all resources in an app: 250 MB
- Maximum resource name length: 250 characters
- Maximum number of resources per app: 256
The compiler will give you hints about prohibited file extensions, but ultimately, the server determines which file types are allowed. And remember, any application you upload to the cloud will be scanned for malware.
Page Updates: CardPageId Override
You can now override the CardPageId
, which is super useful in scenarios where no card page ID exists initially or when it needs to be updated. This gives you more flexibility in how you structure your pages.
Page Updates: UserControlHost page type
Say hello to the new UserControlHost
page type! This allows you to embed a full user control inside a page. Keep in mind that you can only use one user control, and actions aren’t allowed.
So, what can you do with UserControlHost
?
- Embed Power BI reports.
- Integrate embedded browsers.
- Create other fullscreen user control scenarios.
Report Enhancements: Tooltips and Excel Layouts
Reports have also received some love in this release.
Report Tooltips
Tooltips have been added to reports, giving users more insight into the report’s purpose. If you add an action on a page that points to a report, the tooltip will be inherited. Of course, you can always override it in the page action if you need to.

Excel Layout with Multiple Data Sheets
The ExcelLayoutMultipleDataSheets
property splits data items into separate sheets in Excel. This makes it easier to search, filter, and organize related data.
You can override this property in report layouts, allowing you to use the same data set in multiple sheets or a single sheet, depending on your needs.
Report Triggers and Target Format
There are a few new triggers you can use to take greater control of your reports. The OnPreRendering
and OnPostReport
triggers give you even more control over report generation. You can also access the target format within the report code, allowing you to tailor the output based on the format (e.g., PDF, Excel).
Here’s an example:
if CurrReport.TargetFormat = ReportFormat::Pdf then begin
// Specific code for PDF output
end;
In this snippet, the code checks if the report’s target format is PDF. If it is, it executes specific code tailored for PDF output, and you can have different output formatting for Excel or Word.
Previewing Reports: View From Stream
You can now preview reports using ViewFromStream
. This lets users preview documents in the client without having to download them.

If you’re on-premise, you can even preview a specific path.
Including Layout in Report URLs
You can now include the layout in report URLs generated by the GetUrl
function. This allows you to share specific report views with others.

The supported layouts are:
List
Tall tiles
Tiles
Analysis
Miscellaneous AL Language Updates
Here are some other notable AL language updates:
- You can now use negative numbers in the
IncrementStr
function.
- The
CallStack
function allows you to get the current call stack without throwing an exception, making troubleshooting easier. For example:Message(SessionInformation.CallStack())
This example shows how to call theCallStack
function and display the call stack in a message. This can be invaluable for debugging complex code flows.
- The
Continue
keyword lets you skip the current iteration of a loop and move to the next one, improving code readability. For example:

In this loop, even numbers are skipped, and only odd numbers are displayed. The Continue
keyword makes it clear when and why an iteration is skipped.
- You can create multiline strings using
@
and single quotes, simplifying the creation of long strings with newlines. For example:

- The
ToText
method on simple types is now available.ToText
without parameters is equivalent toFormat
, andToText
with theInvariant
parameter is equivalent toFormat(0, 9)
.

JSON Object Enhancements
Working with JSON objects is now easier than ever.
Get Text Method
The GetText
method simplifies retrieving text values from a JSON object. However, keep in mind that it throws an exception if the property is not found. For example:
Destination := JsonObject.GetText('destination');
This line of code retrieves the text value associated with the key ‘destination’ from the JSON object, storing it in the Destination variable.
To avoid exceptions, you can use GetText
with a value for DefaultIfNotFound
. If you use DefaultIfNotFound
, the code will throw an error if the key is not found:
Destination := JsonObject.GetText('destination', true);
Getting Specific Data Types from JSON
There are new methods for getting specific data types from a JSON object:
GetArray
GetInteger
GetBoolean
GetByte
GetChar
These methods make working with JSON objects a breeze.

For example:
MyInteger := JsonObject.GetInteger('myInteger');
MyBoolean := JsonObject.GetBoolean('myBoolean');
These snippets retrieve an integer and a boolean value from the JSON object, respectively.
YAML Support in JSON Objects
You can now read and write YAML in JSON objects. While YAML and JSON aren’t identical, they’re similar, and YAML is often used for configuration files.
The ReadFrom
and WriteTo
YAML functionality has been backported to runtime version 14.3, so you can start using it even in older Business Central versions.
Inheriting AboutTitle and AboutText in Role Explorer
The AboutTitle
and AboutText
properties on request pages provide information and teaching tips to users. These properties are now inherited in the Role Explorer, making it easier to provide context to users.

Imagine a Role Center with actions that display the inherited AboutTitle
and AboutText
. This gives users valuable insights into how to use the report page and its functionality.
Testing Enhancements: Mocking HTTP Calls and Server Certificate Validation
Testing just got a whole lot better!
Catching Outbound Requests
You can now catch outbound HTTP requests in tests using the HttpClientHandler
. This allows you to intercept calls to external services.
Disabling Server Certificate Validation
You can disable server certificate validation for test purposes. This should not be used in production, but it’s useful when connecting to local services or using self-signed certificates.
Here’s how you can do it:
HttpClient.UseServerCertificateValidation := false;
In practice: Imagine testing a service that relies on external API calls. You could use the HttpClientHandler
to mock the external API’s response to ensure consistent test results, even if the external service is temporarily unavailable or returns unexpected data. Also, you could disable the server certificate validation, especially in local development environments where self-signed certificates are common, to avoid certificate-related errors during testing.
Further Exploration
Want to dive even deeper? Check out the changelog on the AL Language extension page in VS Code for all the details of the changes in this release. Also, be sure to try out the pre-release versions for upcoming versions to see the latest changes and provide feedback. You can also watch AL Language BLCE video on youtube, but if you read this far, you have all covered it so far.
These updates to the AL language are awesome! Thanks for joining me on this tour of the Business Central 2025 Release Wave 1. I hope you found this helpful! Happy coding!
Subscribe to our email newsletter to get the latest posts delivered right to your email.
Comments