Dynamics 365 BC Wave 2 Release: What Happens Now?

Stefano Demiliani

Topic: Technical

Date: 12 Sep 2019

Microsoft Dynamics 365 Business Central is the latest Microsoft’s ERP solution, available on-premise and on Cloud as a SaaS service. Microsoft Dynamics 365 Business Central is actually released as platform version 14.X. and this platform permits you to adopt two different programming models for creating customizations:

  • Using old C/AL code (available only for on-premise scenarios), with customizations created in C/SIDE as in the old NAV platform.
  • Using AL code and the extension’s model (available for on-premise and the only supported way for the SaaS platform), with extensions created by using Visual Studio Code.

Important features and changes of Wave 2 release

As you all probably already know, starting from October Microsoft will release a new Dynamics 365 Business Central release which you may call October releaseWave 2 release or (I think it’s more clear) platform 15 release.

Wave 2 release introduces important features and (especially) important changes for customers and partners:

  • new user interface features;
  • new platform features (multiple production environments, the possibility to handle backups, etc);
  • no more Windows Client (Wave 2 release is Web Client only);
  • no more C/AL and C/SIDE: all customizations must be done by using AL language and extensions.

With the Wave 2 release, Microsoft has converted the monolithic C/AL application to AL. Also, they have started to implement an important feature that will be valuable in the future: splitting the application’s code into N separate extensions.

In the October release, you will find two Microsoft’s extensions:

  • Base Application: this contains all the ERP entities and business logic;
  • System Application: this is is the interface to the Business Central platform and cloud ecosystem and it contains all the system-related entities and functions.

However, in the future expect to see more than two apps.

When you create new extensions for the Wave 2 release, your extension’s code must be dependent on those two Microsoft’s apps (dependencies will be automatically added to the app.json file when you create a new AL project that targets the Wave 2 release).

The Base Application is a pure code conversion of the old C/AL code to AL.

The System Application is actually where Microsoft has put their hands on in a consistent way. The extension’s code is publicly available on GitHub here.

As you can see from this repository, the System Application contains a huge set of modules:

Each module has the following architectural schema:

To ensure low coupling and high cohesion, every module is a separate entity equipped with a publicly accessible interface (facade), while the internal implementation of each module is hidden to the outside (public access).

As an example, here is the implementation of the Cryptography module in the System Application:

The module’s publicly accessible interface is defined in a codeunit called Cryptography Management and defined with Access = Public.

This codeunit contains all the publicly exposed functionalities (for example Encrypt, Decrypt, etc.).

The details of each functionality are defined in a separate codeunit, called Cryptography Management Impl. This codeunit contains all the internal implementation for each functionality and it’s defined as Access = Internal:

 

You can learn more about ­Access Modifiers in Dynamics 365 Business Central Wave 2 release by reading this article.

To summarize the logic, by setting Access = Public the object can be accessed by any other code in the same module and in other modules that reference it.

Instead, by setting Access = Internal an object (here a codeunit) can be accessed only by code from the same extension but not from another extension.

This logic is implemented and respected in every module into the System Application. Usually, module can be extended, but in cases that module can’t be extended by design, Microsoft uses the Extensible property on tables, pages, and enums set as false. Here is an example that you can find in the Language module:

Creating separate modules with a defined pattern is absolutely a great thing for many aspects:

  • separation of concerns;
  • encapsulated complexity;
  • stable APIs exposed through a public interface;
  • each module can be developed, tested and updated separately;
  • security: N modules means a smaller attack surface and so more easy to secure.

And last (but not least) there’s also a new interesting aspect to consider now for every partner: we’re going for an open-source contribution model!

Having a separation of the standard application’s base code in two apps (System Application and Base Application) means also another extremely important aspect for partners and ISVs: if you want to create a custom business solution that does not require interactions with the standard ERP entities and business logic, you can now create a new Dynamics 365 Business Central extension by adding dependencies from the System Application only (no more needs to references the Base Application).

A detailed article about this possibility you can find here.

Future scenarios of the Wave 2 release

Here, I’ve turned on the light for a possible future scenario for partners: hosting custom applications inside the Dynamics 365 Business Central platform, without using (and exposing) the standard ERP logic! With a proper licensing model, I think that it could be a new power on your hand as a partner (you could develop and deploy custom applications inside a business platform managed by Microsoft). Have you ever heard about the xRM concept? That is the same possible scenario here, with the power of AL and the Dynamics 365 Business Central platform.

Another myth to clarify: with Wave 2 and AL-only, can I still modify the base code for on-premise?

The answer is YES! I will never stop to say that this must be seen as a worst practice and please try to avoid this as much as possible, but for the on-premise world, you will be able to modify the base code by directly editing the base .al files created by Microsoft, and then creating your custom Base Application.

If you will do that, please always remember the following sentence: ‘in the future, on-premise will follow cloud rules’!

In this article, I’ve described the main changes inside the Dynamics 365 Business Central architectures with the Wave 2 release. Now that Wave 2 (or V15) release will be out, what should I do with my applications? What is the impact of this code refactoring? Will Microsoft breaks my extensions?

The answer is: no! Microsoft guarantees that for 1 year to come there won’t be any breaking changes and everything will be handled by deprecating obsolete objects to guarantee backward compatibility.

What does it mean?

In other words, in your extensions (that works on the latest 14.X platform) you could have parts in your code that must be adapted to the new application’s structure. To give a quick example of this, imagine having a procedure that references the TempBlob table.

If you use this extension’s code for the new Wave 2 (or platform 15) release, you will receive this warning:

This means that you can still use your old code, but shortly Microsoft will remove that table.

For version 15, you will need to use the BLOB Storage Module, alias the new modules available in the System Application extension. For version 15, this code should be refactored in the following way:

More clean isn’t it? 😊

Are you excited for the Dynamics 365 Business Central Wave 2 release? See you at Directions EMEA 2019, where you will hear more about all the huge work that Microsoft has done on this new Dynamics 365 Business Central October release.

 

  • Stephan Weikelt

    is the last screenshot the right one? -> it’s the same like the previous one

    • Morten Seifert

      The first is the Table TempBlob; the second is using the Codeunit “Temp Blob”

  • Carlos Correia

    About your example of implementation of the Cryptography module in the System Application.
    In VS Code is possible to declare the Cryprography Managament, but isn’t possible to use the Go to Definition as is possible in a table like Sales Header.
    Also debuging it doesn’t show the code running inside the Cryptography Management when some procedure is called from our custom app.

    As i’m trying new stuff in BC150, is this some limitation or will be like this? as System Application.app doesn’t bring the objects itself in al but only the linkage?

    Is possible to debug and see code of objects in Systema Application as is?

  • Pingback: Directions EMEA 2019 Recap()

  • Duy Tran

    Hi all,
    I installed BC150 on my local computer without Docker Container installation and it run on localhost:8080/BC150/.
    Then I get source code from Dynamics 365 BC 2019 Wave 2.W1.36649ApplicationsBaseAppSourceBase Application.Source.zip.

    I have created also .vscode folder that contain launch.json file with content as following
    {
    “version”: “0.2.0”,
    “configurations”: [
    {
    “type”: “al”,
    “request”: “launch”,
    “server”: “http://localhost:8080”,
    “authentication”: “UserPassword”,
    “serverInstance”: “BC150”,
    “startupObjectId”: 22,
    “startupObjectType”: “Page”,
    “breakOnError”: true,
    “launchBrowser”: true,
    “schemaUpdateMode”: “Synchronize”
    }
    ]
    }
    Next, I run command AL:Download Symbols from local but it get error
    “Could not download symbols. Please see the Visual Studio Code output log for more details.”

    Could not download reference symbols. Please ensure that:
    1. The correct server name and instance are specified in the launch.json file.
    2. The correct application version is specified in the app.json file.
    3. The dependencies are correctly specified in the app.json file.

    The content of app.json file is default,
    {
    “id”: “437dbf0e-84ff-417a-965d-ed2bb9650972”,
    “name”: “Base Application”,
    “publisher”: “Microsoft”,
    “version”: “15.0.36560.36649”,
    “logo”: “ExtensionLogo.png”,
    “dependencies”: [
    {
    “appId”: “63ca2fa4-4f03-4f2b-a480-172fef340d3f”,
    “name”: “System Application”,
    “publisher”: “Microsoft”,
    “version”: “15.0.0.0”
    }
    ],
    “platform”: “15.0.0.0”,
    “target”: “OnPrem”,
    “showMyCode”: true,
    “brief”: “Base Application (W1)”
    }

    How do I build this Base Application with VS Code?
    Please, help me!
    Thank you so much.

  • Duy Tran

    Hi all,
    I installed BC150 on my server with Docker Container installation and it run on
    Then I get source code from “C:ProgramDataNavContainerHelperALDemoSolution” that I copied from creation of ALProject command with my container name.

    This is content my app.json file and it’s default content
    {
    “id”: “68b54453-f1ae-47fa-adf2-8b2b594075f8”,
    “name”: “myal”,
    “publisher”: “Default Publisher”,
    “version”: “1.0.0.0”,
    “logo”: “ExtensionLogo.png”,
    “dependencies”: [
    {
    “appId”: “63ca2fa4-4f03-4f2b-a480-172fef340d3f “,
    “name”: “System Application”,
    “publisher”: “Microsoft”,
    “version”: “15.0.0.0”
    }
    ],
    “platform”: “15.0.0.0”,
    “target”: “OnPrem”,
    “showMyCode”: true,
    “brief”: “Base Application (US)”
    }
    I had use AL:Download Symbol command to get the symbols and it is OK. However, while I build it then it get error as related to dependencies appId term of System Application
    How do it fix to build this Base Application with VS Code?

    Please, help me!
    Thank you so much. https://uploads.disquscdn.com/images/cfe51783808955cb0fd3000c1eaa0a4c53405a252afcd8964865d8ce3050baae.png

  • Duy Tran

    Hi all,
    I installed BC150 on my server with Docker Container installation and it run on
    Then I get source code from “C:ProgramDataNavContainerHelperALDemoSolution” that I copied from creation of ALProject command with my container name.

    This is content my app.json file and it’s default content
    {
    “id”: “68b54453-f1ae-47fa-adf2-8b2b594075f8”,
    “name”: “myal”,
    “publisher”: “Default Publisher”,
    “version”: “1.0.0.0”,
    “logo”: “ExtensionLogo.png”,
    “dependencies”: [
    {
    “appId”: “63ca2fa4-4f03-4f2b-a480-172fef340d3f “,
    “name”: “System Application”,
    “publisher”: “Microsoft”,
    “version”: “15.0.0.0”
    }
    ],
    “platform”: “15.0.0.0”,
    “target”: “OnPrem”,
    “showMyCode”: true,
    “brief”: “Base Application (US)”
    }
    I had use AL:Download Symbol command to get the symbols and it is OK. However, while I build it then it get error as related to dependencies appId term of System Application
    How do it fix to build this Base Application with VS Code?

    Please, help me!
    Thank you so much. https://uploads.disquscdn.com/images/cfe51783808955cb0fd3000c1eaa0a4c53405a252afcd8964865d8ce3050baae.png

  • Duy Tran

    Hi all,
    I installed BC150 on my server with Docker Container installation and it run on
    Then I get source code from “C:ProgramDataNavContainerHelperALDemoSolution” that I copied from creation of ALProject command with my container name.

    This is content my app.json file and it’s default content
    {
    “id”: “68b54453-f1ae-47fa-adf2-8b2b594075f8”,
    “name”: “myal”,
    “publisher”: “Default Publisher”,
    “version”: “1.0.0.0”,
    “logo”: “ExtensionLogo.png”,
    “dependencies”: [
    {
    “appId”: “63ca2fa4-4f03-4f2b-a480-172fef340d3f “,
    “name”: “System Application”,
    “publisher”: “Microsoft”,
    “version”: “15.0.0.0”
    }
    ],
    “platform”: “15.0.0.0”,
    “target”: “OnPrem”,
    “showMyCode”: true,
    “brief”: “Base Application (US)”
    }
    I had use AL:Download Symbol command to get the symbols and it is OK. However, while I build it then it get error as related to dependencies appId term of System Application
    How do it fix to build this Base Application with VS Code?

    Please, help me!
    Thank you so much.