Microsoft D365 Business Central Extension v2.0 - Locus IT Services

Microsoft D365 Business Central Extension v2.0

Locus IT ServicesMicrosoft Dynamics 365 / D365Microsoft D365 Business Central Extension v2.0

Microsoft D365 Business Central Extension v2.0

To make your Microsoft D365 Business Central Extension v2.0 available to tenant users requires three basic tasks: publish the extension package to the Dynamics 365 Business Central server instance, synchronize the extension with the tenant database and install the extension on the tenant.

This article describes how to publish and install the first version of an extension. This model is building upon series of Dynamics 365 Business Central platform improvements, such as eventing and the modern development environment based on Visual Studio Code.

Microsoft D365 Business Central Extension v2.0 Tasks

1. Publish and Synchronize an Extension

Publishing an extension to a Dynamics 365 Business Central server instance adds the extension to the application database that is mounted on the server instance, making it accessible for installation on tenants of the server instance. Publishing updates internal tables, evaluates the components of the extension behind the scenes and creates the necessary metadata objects that are utilized at run time.

Synchronizing an extension updates the database schema of the tenant database with the database schema that is described by the extension objects. For example, if a table or table extension is added in the extension, then the respective full or companion table is generated in the tenant database.

To publish and synchronize an extension

  • Start the Dynamics NAV Administration Shell.
  • To publish the extension, run the Publish-NAVApp cmdlet.

The cmdlet takes as parameters the MS Dynamics 365 Business Central service instance that you want to install to and the .app package file that holds the extension. The following example produces the extension MyExtension.app to the YourDynamicsNAVServer instance.

Publish-NAVApp -ServerInstance YourDynamicsNAVServer -Path “.\MyExtension.app”

  • To synchronize the schema of a tenant database to the extension, run the Sync-NavApp cmdlet.

The following example synchronizes the extension MyExtension with version number 1.0.0.0:

Sync-NavApp -ServerInstance YourDynamicsNAVServer -Name ExtensionName -Version 1.0.0.0 -Tenant TenantID

Replace TenantID with the tenant ID of the data base. If you do not have a multitenant server instance, use default or omit this parameter. The extension can now be installed on tenants.

2. Install an Extension

After you publish and synchronize an extension, you can install it on tenants to enable the extension and make it available to users in the client. Installing an extension can be done from the Dynamics 365 client or Dynamics NAV Administration Shell.

To install an extension by using Dynamics NAV Administration Shell

  • Start the Dynamics NAV Administration Shell.
  • To install the extension on one or more tenants, utilize the Install-NAVApp cmdlet.

This example installs the extension My Extension for Tenant1 and Tenant3. In single tenant deployments, you either specify default as the tenant ID, or you omit the –Tenantparameter.

Install-NAVApp -ServerInstance YourDynamicsNAVServer -Name ”My Extension” –Tenant Tenant1, Tenant3

To install an extension by using the client

  • In Dynamics 365 Business Central , use search to open the Extension Management page.

In the Extension Management window, you can view the extensions that are published to your server. For each extension, you can check the current installation status.

  • Select an extension to see additional information and to install the extension.
  • Review and accept the license agreement.
  • Choose the Install button to install the extension.

The introduction of Extensions 2.0 vastly improves on the previous version of extensibility, making Microsoft Dynamics 365 Business Central extension framework much more robust and future proof.

In addition to these improvements, you also get benefits of modularity and easier solution upgrades. For more information on how Microsoft D365 Business Central Extension v2.0 can help your business, please contact us.

Locus IT Project Management Office
What’s it?