How to: Publish and Install an Extension
To make your extension available to users, the package must be published to a specific Microsoft Dynamics NAV Server instance. The extension can be installed for one or more tenants.
To publish or remove an extension
In the Microsoft Dynamics NAV 2016 Administration Shell, use the
Publish-NAVApp
cmdlet. The cmdlet takes as parameters the server you want to install to and the .navx package file that contains the extension. The following example publishes the extension MyExtension to the YourDynamicsNAVServer instance.Publish-NAVApp -ServerInstance YourDynamicsNAVServer -Path MyExtension.navx
Publish does more than just update internal tables. It also compiles the components of the extension behind-the-scenes and builds the necessary metadata objects that are used at runtime.
You can get an overview of the published extensions and their state using the
Get-NAVAppInfo
cmdlet. If no tenants have a specific extension installed, you can completely remove it using theUnpublish-NAVApp
cmdlet.In the Microsoft Dynamics NAV 2016 Administration Shell, use the
Unpublish-NAVApp
cmdlet. The cmdlet takes as parameters the server you want to remove the extension from, and the name of the extension. The following example removes the extension MyExtension from the YourDynamicsNAVServer instance.Unpublish-NAVApp -ServerInstance YourDynamicsNAVServer -Path MyExtension
Once an app has been published, it must be made available for any tenant that wishes to use it.
To install an extension
In the , use the
Install-NAVApp
cmdlet. The following example installs the MyExtension for Tenant1 and Tenant3. In single-tenant deployments, you either specify default as the tenant ID, or you omit the –Tenant parameter.Install-NAVApp -ServerInstance YourDynamicsNAVServer -Name ”My Extension” –Tenant Tenant1, Tenant3
Use
Get-NAVAppInfo –Tenant
command to get an overview of the extensions for that tenant, use theGet-NAVAppTenant
cmdlet to get all tenants that have installed a specified extension, and uninstall an extension using theUninstall-NAVApp
cmdlet.Note
When you uninstall an extension that includes tables and fields, this impacts the database schema and any data that the tables and fields contain. For more information, see Extending Microsoft Dynamics NAV Using Extension Packages.
See Also
Tasks
How to: Develop an Extension
How to: Create an Extension Package
Concepts
Extending Microsoft Dynamics NAV Using Extension Packages
Other Resources
Comparing and Merging Application Object Source Files
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Administration Cmdlets for Microsoft Dynamics NAV