Create lists and dictionaries of interfaces in AL

Important

Some of the functionality described in this release plan has not been released. Delivery timelines may change and projected functionality may not be released (see Microsoft policy). Learn more: What's new and planned

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

Business value

In the Business Central AL language, dictionaries and lists are powerful data structures that offer efficient lookup of key-value pairs and ordered collections, and both allowing managing collections of data dynamically. We're now adding the ability to have lists and dictionaries of interfaces, providing more flexibility and power when you work with interface abstractions.

Feature details

You can now create lists or dictionaries of interfaces.

The syntax follows these patterns, aligned with creating a List or Dictionary of a simple type:

  • List of [Interface IFoo]
  • Dictionary of [; Interface IFoo]

In the System Application, you can find the complete examples of using a list of interfaces in the Telemetry Logger.

The following examples illustrate creating lists and dictionaries with interfaces.

Example of creating a dictionary of interfaces

Examples from the System App of creating lists of interfaces

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.