Install and Uninstall Business Central Extension using BC Administration Shell

  1. Publish Extension

    publish-NAVApp -SkipVerification -ServerInstance BC140 -Path "c:\BCMagento.app"

  • publish-NAVApp is a Keyword
  • -SkipVerification — You cannot publish an extension that has not been code signed. To overrule this check and publish the
    unsigned extension, set the –SkipVerification parameter.
  • -ServerInstance  name of BC instance name, Default is BC140
  • -Path path of .app file.

 

  • Unpublishing extensions

unpublish-NAVApp  -ServerInstance BC140 -Name "My Extension Name"

  • Synchronizing (clean mode) an extension after uninstallation

Sync-NAVApp -ServerInstance BC140 -Tenant ‘Default’ -Name ‘x2x BC Magento Connector’ -Mode Clean

Running the upgrade for the new extension version

To upgrade to the new extension version, you use the Sync-NavApp and Start-NAVAppDataUpgradecmdlets of the Dynamics NAV Administration Shell to synchronize table schema changes in the extension with the SQL database and run the data upgrade code.

  1. Publish the new extension version. For simplicity, this example assumes the extension is not signed, which is not allowed with Dynamics 365 and is not recommended with an on-premise production environment.
    Publish-NAVApp -ServerInstance DynamicsNAV -Path .\ProswareStuff_1.7.1.0.app -SkipVerification
    

    This validates the extension syntax against server instance and stages it for synchronizing.

  2. Synchronize the new extension version with the database.
    Sync-NAVApp -ServerInstance DynamicsNAV -Name ProswareStuff -Version 1.7.1.0
    

    This synchronizes the database with any table schema changes in the extension; it adds the tables from the extension to the tenant.

  3. Run a data upgrade.
    Start-NAVAppDataUpgrade -ServerInstance DynamicsNAV -Name ProswareStuff -Version 1.7.1.0
    

    This runs the upgrade logic that is defined by the upgrade codeunits in the extension. This will uninstall the current extension version, and enable the new version instead.

Install and Uninstall Business Central Extension using BC Administration Shell

Leave a Reply

Scroll to top