What’s new: Extension for Microsoft Dynamics NAV 2016
We all have seen the situation where we need to put in lot of efforts to modify the standard NAV object in order to run our custom add-on solutions with standard NAV codebase. With the frequent release of cumulative updates for NAV 2013 version onwards, maintaining and deploying the add-on solutions became further complex.
So with the introduction of Microsoft Dynamics NAV 2016, Microsoft has introduced extensions as a new feature which enable us to modify our Microsoft Dynamics NAV system without directly altering the source codes, making it easier to deploy, manage, and upgrade customizations or extensions.
While a developer can still use the existing Microsoft Dynamics NAV Development system to customize or extend Microsoft Dynamics NAV, a new set of Windows PowerShell cmdlets have been introduced by which one can add changes into a proprietary package format, and these extensions are named as .navx package files.
These packages can be installed, and more importantly uninstalled, from a Microsoft Dynamics NAV system with ease. Again packages can be automatically upgraded through the installation process using the cmdlet script introduced in NAV 2016 therefore upgrading to newer versions is made easier.
If we try to understand Extensions in simpler terms then extensions are the runtime application of objects and object deltas for a specific combination of extension.
When an extension is published to a Microsoft Dynamics NAV deployment, it compiles the objects in it against the current application database, at runtime, it simply loads the associated objects for that app and tenant.
By doing this, we remove the need to merge code but we also introduce some limitations, specifically on what properties you can modify on objects such as pages and tables, and there are complete restrictions on altering existing codeunit
An extension package can contain both new and modified objects. In Microsoft Dynamics NAV 2016, the following object types can be added and included in an extension:
You can also modify existing objects of the following types as permitted by your license:
- Action Items
Note: The main difference from classical development is that source code modifications are not allowed. Instead, you use C/AL events to extend and customize objects.
New system tables are added to support extensions.
Below is the quick details for the same:
- NAV App Object Metadata – Stores the metadata deltas for an extension.
- NAV App Tenant App – Contains all extensions that are installed to tenants and part of the application database. This table is synchronized with NAV App Installed App in the tenant databases and is used to drive runtime decisions about tenant/app relationships. It is also watched for changes by each Microsoft Dynamics NAV Server instance to support on-the-fly app switching.
- NAV App Data Archive – Points to tables created to archive data for extensions that have been uninstalled. Used to provide access to the data when the extension is reinstalled during an upgrade.
- NAV App Installed App – Contains information about extensions that are installed in this tenant. This lives in the tenant database and is written/read on mount/unmount to make sure tenants keep track of their apps even when detached from an application database.
- NAV App - Contains all extensions that are published to the system. This is part of the application database.
- NAV App Dependencies – List of dependencies for individual extensions that are published to the system.
- NAV App Capabilities – List of capabilities for each extension that is published to the system. Pulled from the manifest at publication time.
- NAV App Object Prerequisites – List of prerequisite objects for individual extensions that are published to the system.
- Tenant Permission Set - Defines the mapping between extensions and permission sets.
- Tenant Permission – Contains permissions for objects as defined by permission sets in extension packages.
New Virtual table introduced for extension which we can used while building the extension:
- AllObj, AllObjWithCaption includes new objects from all installed extensions based on the current session/tenant.
- AllObj, AllObjWithCaption includes the App Package ID field (empty GUID for base objects, package id GUID if object comes from an extension)
Now in my next blog I will try to demonstrate how to create extension for Microsoft Dynamics NAV 2016. In case anyone has query please write back to me on email@example.com