EXTENSIONS IN NAV
INTRODUCTION:
In
Microsoft Dynamics NAV 2016 and onwards, Extensions has introduced as a new
feature which enable us to modify our Microsoft Dynamics NAV system without
directly altering the source codes.
Extensions
can be used to deliver, manage and upgrade customizations.
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 commands have been introduced by which one can add changes into a
package format and these extensions are named as .NAVX package files.
These
packages can be easily installed or even uninstalled from the Microsoft
Dynamics NAV system.
When an extension is published to a Microsoft Dynamics NAV environment, 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 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 and onwards, the following object types can be added and included in an extension:
- Pages
- Tables
- Menusuites
- Codeunits
You can also modify existing objects of the following types as permitted by your license:
- Pages
- Tables
- 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.
BENEFITS OF
USING EXTENSIONS IN MICROSOFT DYNAMICS NAV:
- Easy to install to your deployment.
- Easy to upgrade – Install a new Extension as a part of the
upgrade process OR Upgrade an Extension independently, without a full system
upgrade.
- Easy to uninstall – Extensions are easy to remove and
uninstall. We have the option to save the data from the Extension when uninstalling
or upgrading.
- Tenant specific customization in Multi-tenant environment.
- Extensions are easily upgraded & eliminating code merging.
- Easy to install and open the NAV App package file.
STEP1: Create following folders for creating
NAVX package: BASE, CUSTOM and DELTA.
- BASE: Creation of BASE file includes importing of objects before modification. As new codeunit is created in which no modification is done. So we will export it as BASE file.
- CUSTOM: Creation of CUSTOM file includes importing of objects after modification.
- DELTA: Creation of DELTA file includes comparison of BASE and CUSTOM file objects.
Copy and
paste the above command in ISE and output will be a message on screen as shown
below:
STEP3: To compare BASE and CUSTOM file for
creating DELTA folder, command is as shown below:
Following
DELTA file is created in DELTA folder as shown below:
STEP4: Create Manifest file as shown below:
Copy and
paste the above command in ISE and output will be a message on screen as shown
below:
STEP5: Create NAVX file
Copy and
paste the above command in ISE and output will be a folder named “test.navx” screen as shown below:
STEP6: Publish Extension by using the below
command:
STEP7: Install Extension from the RTC, by
choosing the Extension Management page:
STEP8: Output of Extension, which is defined
in CUSTOM file is as shown below:





