web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Guidelines for Partners: The Universal Code Initiative and SaaS related cases

SIMPLANOVA Profile Picture SIMPLANOVA

This article will explain the Universal Code Initiative, and its goals and will enlighten you about the most popular breaking changes regarding Cloud development.

 

Universal Code Initiative aims for better solutions so that code can live in any target environment. The new Business Central Universal code initiative is a modern independent software vendor (ISV) approach to ensure that all future customers can choose Dynamics 365 Business Central online while finding the right apps on Microsoft AppSource to meet their unique requirements. BC on-premises customers who aren’t licensing ‘universal code’ (cloud-optimized extensions) will be affected by gradually increasing fees from 2023 onwards (Dynamics 365 Business Central Universal code initiative | Dynamics 365 Lab).

 

Microsoft has introduced us to two new Modules:

  • Module “Implemented code is not in extensions” – necessary for code customized base apps.
  • Module “Implemented code is not cloud-optimized” – code is in extensions, but that code could only work OnPrem.

Partners that have code working only OnPrem will have to buy a license.  The fee for that license is a per-user per-year fee, which increases every year. You can check fees in the following table:

 

Universal Code Initiative

(The “Universal Code Initiative”)

 

This price is “per full user.” The more users you have, the more costly it will be to run your legacy code. If you’re a large company with, say, a 100-user license, that means, in three years, you will be paying as much as $42500 annually just to run outdated code. However, this will not affect customers who licensed BC OnPrem before April 1, 2022.

Let’s talk about requirements while creating extensions to keep code Universal:

  • No code customization in the BaseApp.
  • Writing code that does not require “OnPrem” scope.

When you create an Extension, you must set the “Target” in the app.json file to “Cloud” as in the example below.

 

Universal Code Initiative

 

That means that your code should be able to compile in both: Cloud and OnPrem development. Keep in mind there are some groups of functionalities that will not work in a Cloud environment:

  • Local file operations
  • Custom .Net libraries
  • Direct SQL database operations
  • Others

 

In order to rework file operations, you will have to set up BC to use external connectors and work with files in online repositories, such as Google Drive. For custom-created .Net libraries, you will have to use Cloud-approved applications which allow connecting external applications to your BC solution, such as Power Automate (which already contains more than 500 connectors). As you may probably notice, the Base Application still uses some .Net libraries, and why can we not use them in custom extensions? The answer is simple – all of the previously used functionalities containing any .Net libraries have been moved to the new objects so you can manipulate and use them in your extension, e.g. instead of DotNet Regex, which is allowed in OnPrem development and not in Cloud, you can use Codeunit Regex which is already created in Base Application.

 

Here are some frequently used breaking changes and their solutions while switching from OnPrem to Cloud development in Business Central 2022 Wave 1:

 

 

 

 

 

 

 

Universal Code Initiative

 


 

In conclusion, as Business Central seems to be moving towards Cloud development, it becomes more and more important to make your code more Universal.

The post Guidelines for Partners: The Universal Code Initiative and SaaS related cases appeared first on Simplanova.

Comments

*This post is locked for comments