We are very excited to announce the arrival of new development capability in Microsoft Dynamics NAV 2016, called Extensions.
Extensions enable you to modify your Microsoft Dynamics NAV system without directly altering the source resources, making it easier to deploy, manage, and upgrade customizations or extensions. While you will 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 that mean you can add your changes into a proprietary package format, called a .navx package file. These packages can be installed, and more importantly uninstalled, from a Microsoft Dynamics NAV system with ease. Packages can be automatically upgraded through the installation process, so up taking newer versions is made easier.
You might be wondering by now how an extension can be used to customize a system without modifying the source code? Extensions are, in the simplest terms, the runtime application of objects and object deltas for a specific combination of extension and tenant. When an extension is published to a Microsoft Dynamics NAV deployment, it compiles the objects in it against the current application database, and then an app installation for a tenant stores the association and builds the needed data schema. 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 codeunits. To affect the logic in extensions, you need to use the new eventing model that is also being introduced in Microsoft Dynamics NAV 2016. It’s important to note that there are no restrictions on the introduction of new objects or codeunits.
For a list of object types that are supported in extensions for Dynamics NAV 2016, see Extension Packages Capability Support Matrix.
To create and deploy an extension:
- Establish the BASE as exported txt files.
- Create functionality in the development environment. For more information, see How to: Develop an Extension.
- Export your changed and new application objects to TXT files.
- Create DELTA files using the Dynamics NAV Development Shell. For more information, see Comparing and Merging Application Object Source Files.
- Package the changed and new application objects into a Extensions that can be deployed on any Microsoft Dynamics NAV 2016 system. For more information, see How to: Create an Extension Package.
If you need to update an extension, you simply uninstall the old version and then install the updated one. As a developer, you will need to code specially named upgrade functions in one of your codeunits in your extensions. These functions are automatically called when the extension is installed and can access the data that was automatically archived by the system when the previous version was uninstalled. For more information, see Extending Microsoft Dynamics NAV Using Extension Packages.
We plan to continue to enhance the extensions story in future versions of Microsoft Dynamics NAV, so stay tuned!