Blog |

First Look: Exciting New Development Features in Microsoft Dynamics Business Central 2024 Release Wave 2 (v25)

Wednesday, July 31, 2024
Reading time: 8 minutes

Microsoft Dynamics Business Central continues to evolve, and the upcoming 2024 Release Wave 2 (v25) is packed with new development features aimed at enhancing the productivity and capabilities of developers working within the ecosystem. Last week we looked at new application features. This first look dives into some of the most noteworthy development updates, providing insights into how these new features can streamline your development processes and improve the functionality of your custom solutions. For a comprehensive overview, check out the full release plan.

This version seems to have a focus on extending the Interfaces in Business Central, so let’s delve into that first:

Extend AL Interfaces

The ability to extend AL interfaces is a major enhancement in this release. This feature allows developers to build more modular and reusable code by defining interfaces that can be extended in other extensions. It promotes better abstraction and decoupling of code, making your extensions more maintainable and easier to upgrade. The following code snippet will give you an idea of how this will work.
Figure: Code snippet of an Extended AL Interface

Learn more about extending AL interfaces here.

Type Testing and Casting Operators for Interfaces

This feature introduces new type testing and casting operators for interfaces, allowing developers to write more robust and type-safe code. It enhances the ability to work with interfaces, making it easier to test and cast types within your AL code.

The IS operator

The is operator allows you to test whether an instance of an interface, or the content of a variant supports a specific interface. Here’s the syntax for using the is keyword:

You can also use the is operator with variants:

The AS operator

The as operator is used for casting an instance of an interface to a specific interface. If the source interface doesn’t implement the target interface, it will throw an error at runtime. Here’s an example:

Similarly, the as keyword works with variants:

Find out more about type testing and casting here.

Extend and Customize Profiles from Other Extensions

This new capability allows developers to extend and customize profiles that are defined in other extensions. It provides greater flexibility in tailoring the user experience by modifying existing profiles without the need to duplicate code or create new profiles from scratch. This feature enhances the adaptability of Business Central to meet specific business requirements. See a small code snippet below showing how you can extend a Profile.
Figure: Code Snippet of an Extended Profile.

Read more about extending and customizing profiles here.

Package Resources in Extensions and Access from AL

Developers can now package resources such as images, scripts, and other files within their extensions and access these resources directly from AL code. This feature simplifies the management of extension assets and ensures that all necessary resources are bundled together, reducing the complexity of deployment and maintenance.

Find out more about packaging resources in extensions here.

Pull Extension Source from GitHub When Opening Visual Studio Code from the Web Client

This integration enables developers to pull the source code of extensions directly from GitHub when opening Visual Studio Code from the Business Central web client. It streamlines the development workflow by allowing seamless access to version-controlled code, facilitating collaboration and ensuring that the latest codebase is always at hand.

From the Extension Management list page, you now have a new Open Source in VS Code option in the context menu for an extension:

If you invoke Open Source in VS Code, Visual Studio Code will open and ask you whether to clone or open the GitHub repo for the extension. It will use the repo metadata that was included in the extension when it was built:

Explore this feature in detail here.

Restore Extensions if Publishing from Visual Studio Code Fails

In scenarios where publishing an extension from Visual Studio Code fails, this new feature provides the ability to restore the previous version of the extension. It helps maintain system stability and reduces downtime by quickly reverting to a known good state, ensuring that development issues do not disrupt ongoing business operations.

Learn more about restoring extensions here.

Run Code Action for 'with' for File, Project, or Workspace

The new code action feature allows developers to apply the ‘with’ statement across files, projects, or entire workspaces. This can significantly speed up the development process by automating repetitive tasks and ensuring consistent code formatting and structure across your codebase.

Discover more about running code actions here.

Set Up Easier In-Client Performance Profiling with Rules

Performance profiling within the client has been made easier with the introduction of profiling rules. Developers can now set up and manage performance profiling directly from the client, allowing for more accurate and efficient identification of performance bottlenecks and optimization opportunities.

This example shows how you can set up a schedule for capturing profiles for a specific user’s browser activity during 5 days:

Read more about performance profiling here.

Improved Features for Report Documents

Business Central now includes improved features for working with report documents. These enhancements allow for more flexible and powerful report generation, catering to complex reporting needs and providing better insights through customized report layouts and data presentation.

The following improvements are available for the Word layout feature:

Learn more about report document improvements here.

Use the Ternary Operator When Coding in the AL Language

The introduction of the ternary operator in AL language is a significant addition, enabling more concise and readable conditional expressions. This operator allows developers to write more streamlined and efficient code, improving overall code quality.

Here’s an example of using if-then-else as until now and the new ternary operator:

Discover how to use the ternary operator here.

Use the 'this' Keyword for Codeunit Self-Reference

The ‘this’ keyword is now available for self-referencing within codeunits. This enhancement simplifies the coding process by providing a straightforward way to reference the current instance of a codeunit, making the code more intuitive and easier to manage.

Read more about the ‘this’ keyword here.

Conclusion

The Microsoft Dynamics Business Central 2024 Release Wave 2 (v25) brings a host of new development features designed to enhance the efficiency, flexibility, and power of your development efforts. Whether it’s extending AL interfaces, streamlining performance profiling, or utilizing new coding enhancements, this release has something for every developer.

Stay tuned for more detailed explorations of these features as we approach the official release date. For a complete overview of all the upcoming features, check out the full release plan.

Berny Düring

Mere om Business Central

Kick ICT

"It was reassuring to work closely with Companial, confirming that we were on the right track and identifying ways to ...

Læs mere
Companial