Share via


Work with multiline strings in AL

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Apr 1, 2025 Apr 1, 2025

Business value

When you develop AL, you sometimes use very long strings. Previously, you had to write these strings in one line, which made it hard to read the content. In this release, we added support for strings that span multiple lines. You can now format string content in a way that's easier to read. This feature is especially helpful when you work with structured string content, such as JSON content.

Feature details

You can now write a string in AL that spans multiple lines by prefixing it with @. This feature lets you write the string in a more readable form. Use it when the string contains structured formats, like JSON content.

When you use this option, avoid adding extra white space, such as indenting lines. The white space becomes part of the string.

The following example shows how to use this feature when you assign a JSON template structure to a text variable. The example uses @ at the start of the string to indicate a multiline string.

Example of using the new multiline string feature in AL

Geographic areas

Visit the Explore Feature Geography report for Microsoft Azure areas where this feature is planned or available.

Language availability

Visit the Explore Feature Language report for information on this feature's availability.

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.

Additional resources

Multiline strings (docs)