How to: Publish and Install an Extension
Note
Extensions v1.0 are no longer supported. The text in the article applies to extensions v1.0. For information about writing extensions in AL, see the table below.
For information about | See |
---|---|
Getting started writing extensions using the AL Language. | Getting Started |
Converting extensions. | Converting Extensions V1 to Extensions V2 |
Writing extension install code for when an extension is installed for the first time, or for when an uninstalled extension is reinstalled. | Writing Extension Install Code |
Making a newer version of an extension available. | Upgrading Extensions V2 |
Publishing, synchronizing, and installing the extension on the tenant. | Publishing and Installing an Extension v2.0 |
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. This content applies to Extensions V1.0. For information about Extensions v2.0, see How to: Publish and Install an Extension V2.0 and Developing Extensions Using the AL Development Environment.
To publish or unpublish an extension
In the Microsoft Dynamics NAV 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 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 or uninstall an extension using PowerShell
To install an extension, in the Microsoft Dynamics NAV Administration Shell, 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
To uninstall an extension, use the
Uninstall-NAVApp
cmdlet. For example:Uninstall-NAVApp -ServerInstance YourDynamicsNAVServer -Name "My Extension" -Version 1.0.0.0
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.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.
To install and uninstall an extension in the client
In Dynamics NAV, open the Extension Management window to view the extensions that are published to your server. For each extension, you can see the current installation status.
Choose an extension to see additional information and to install the extension.
Review and accept the license agreement.
Choose the Install button to install the extension.
Note
When you install an extension that includes changes to the menu suites, this does not take effect for any user until you sign out and then sign in again.
To uninstall an extension, choose the Uninstall action.
Alternatively, simply choose the extension. This opens the Uninstall Extension window.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
Getting Started
<!--
Extending Microsoft Dynamics NAV Using Extension Packages
How to: Develop an Extension
How to: Create an Extension Package
Comparing and Merging Application Object Source Files
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Administration Cmdlets for Microsoft Dynamics NAV