With Extensions you can extend and customize Microsoft Dynamics NAV without changing the original application.
Customize your ERP system
With Dynamics NAV Extensions you can adapt the ERP solution without changing the underlying C/AL code and metadata. Which means you can extend and customize the functionality of Microsoft Dynamics NAV without changing the objects in the original application.
Extensions was introduced in Dynamics NAV as an implementation method. With expansion packs, it is possible to implement, upgrade and uninstall functionality in the local environment, giving users full control over the extra functionality they need.
We will explain 5 easy step to create NAV Extension:
1. Setting up working space
Working with 3 databases which initially will be restored from NAV Installer.
– First database with Demo database as Demo Database NAV (10-0), it will be the ORIGINAL database.
– Second database with Demo database as TestExtension, all modifications will make on this database, it will be the MODIFIED database.
– Third database with Demo database as ApplyExtension, Extension will be install in this database; it will be the TARGET database.
– create a NAV service (TestExtension) pointing to the database that will be working with in the development environment, in this case is TestExtension.
– create 3 folders on your local drive: ORIGINAL, MODIFIED, DELTA
2. Create extension content
Add field 50000 “Example No.” – Integer on table 14 Location.
Add this new field to Page 15, “Location List”.
Created a new codeunit, 50000, TestExtension, with 2 empty global functions and subscribe to Location table standard published events.
And these are the 3 objects:
3. Populate local folders: ORIGINAL, MODIFIED and DELTA:
a. Populate ORIGINAL:
Point Service tier towards Demo Database NAV (10-0) and from Development environment export all objects or only export Table 14 and Page 15 for faster text file processing as Original.txt. As this file contains a concatenation of all objects we will need to split the big file into smaller ones (one per object). In the ORIGINAL folder, create a Split folder. From the Dynamics NAV 2017, Development Shell run as administrator:
Split-NAVApplicationObjectFile -Source .\original\*.txt -Destination .\original\split\
b. Populate MODIFIED
Point Service tier towards TestExtension and from Dev. environment export all objects (or just Table 14 and Page 15 if you want a faster text file processing) as Modified.txt.
For the same reason as in the previous step split big Modified file:
Split-NAVApplicationObjectFile -Source .\Modified\*.txt -Destination .\Modified\split\
c. Populate DELTA
To create Delta files run as administrator:
Compare-NAVApplicationObject -OriginalPath .\ORIGINAL\SPLIT\ -ModifiedPath .\MODIFIED\Split\ -DeltaPath .\DELTA\
Processed 4965 objects:
Inserted 1 objects
Deleted 0 objects
Changed 2 objects
Identical 4963 objects
Failed 0 objects
4. Create NAVX file (extension file)
From the Microsoft Dynamics NAV 2017 Development Shell run as administrator:
New-NAVAppManifest -Name “FirstExtension” -Publisher “SVIRLAN.com” -Version “220.127.116.11” | New-NAVAppPackage -Path FirstExtension.navx -SourcePath .\DELTA
5. Publish Extension
To publish the new extension in ApplyExtension database, point your service tier to the ApplyExtension database, from Microsoft Dynamics NAV 2017 Development Shell run as administrator:
Publish-NAVApp -Path .\FirstExtension.navx -ServerInstance TestExtension -SkipVerification