Tips when upgrading to Docentric version 3.4.8+ relating to the Docentric AX License Plate Labels and Docentric AX Warehouse Labels models

Intro

Starting from Docentric version 3.4.8 the old Docentric AX License Plate Labels model has been renamed to the Docentric AX Warehouse Labels model.

This has been done to indicate the desire of Docentric to expand the Warehouse models feature to cover other types of ZPL based labels, not just license plate labels.

While following the upgrade instructions (found here), it is possible to run into some problems, we will discuss how to fix these below.

Unable to find report design DocWHSLicensePlateLabel.Report

If when you have successfully updated Docentric, you try to use features related to the Docentric AX Warehouse Labels model (for example improved License Plate Labels) and you get the following error:
image

This means that you need to deploy the DocWHSLicensePlateLabel.Report report.

If you’re on a DEV machine, the quickest way to deploy the report is to just run this command:

C:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -Module DocentricAXWarehouseLabels -PackageInstallLocation “C:\AosService\PackagesLocalDirectory”

NOTE: Your AosService directory may be on a different drive than C: (Usually K:).

Errors on refreshing models or having references to the Docentric AX License Plate Labels model

When refreshing models after installing the latest update, you might get this error:
image
Transcription:

Please correct the metadata files for the following issue(s):
Module ‘DocentricAXLPLextensionexample’ has invalid
reference to module ‘Docentric AX License Plate Labels’ that can
cause circular dependencies. This is an indication that model
store is in a broken state.
Then select the “Refresh models” menu item in the
Dynamics 365 | Model management menu to refresh the
models.

This is most likely because there is a model that is referencing the now obsolete Docentric AX License Plate Labels model. In this example the model is called DocentricAXLPLextensionexample, as can be seen in the first part of the error message.

To fix this, follow these steps:

  1. Find and rename the descriptor file of the afflicted model(s), for example by adding the suffix " - Backup" :
  2. Change the referenced model in the descriptor file of the model that is referencing the obsolete model:


  3. Save the new descriptor file and name it as the original (without the " - Backup" suffix):
    image
  4. Delete the old descriptor file (the one with the " - Backup" suffix):
  5. It is recommended to also remove the obsolete Docentric AX License Plate Labels model, for this please follow the steps under the Duplicate metadata artifacts in this forum post.

Duplicate metadata artifacts

If while updating Docentric you receive an error on database sync similar to this:
Runtime metadata is invalid because the same metadata artifact has been defined in multiple assemblies
(full error log below)

Log level - Error | Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadCrossAssemblyDuplicateException: Runtime metadata is invalid because the same metadata artifact has been defined in multiple assemblies. \nFirst 10 conflicting names: DocWHSDocumentRoutingPrinterEntity. \nSee metadata events for complete list.
   at Microsoft.Dynamics.AX.Metadata.Storage.ErrorReportingHelper.ThrowMetadataReadCrossAssemblyDuplicateException[T](IList`1 artifactNames, IDictionary`2 modulesToArchives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1.GetPrimaryKeysNoCache()
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1..ctor(RuntimeProviderConfiguration configuration, RuntimeModelManifestProvider modelManifestProvider, IDictionary`2 archives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeMetadataProvider..ctor(RuntimeProviderConfiguration configuration, Boolean extensions, ExtensionLoader`1 formExtensionLoader, ExtensionLoader`1 tableExtensionLoader, ExtensionLoader`1 enumExtensionLoader, ExtensionLoader`1 menuExtensionLoader, ExtensionLoader`1 securityRoleExtensionLoader, ExtensionLoader`1 securityDutyExtensionLoader, ExtensionLoader`1 dataEntityViewExtensionLoader, ExtensionLoader`1 edtExtensionLoader, ExtensionLoader`1 viewExtensionLoader, ExtensionLoader`1 querySimpleExtensionLoader, ExtensionLoader`1 menuItemDisplayExtensionLoader, ExtensionLoader`1 menuItemActionExtensionLoader, ExtensionLoader`1 menuItemOutputExtensionLoader, ExtensionLoader`1 workflowTemplateExtensionLoader, ExtensionLoader`1 workflowTaskExtensionLoader, ExtensionLoader`1 workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensionsUpdated(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader, WorkflowTemplateExtensionLoader workflowTemplateExtensionLoader, WorkflowTaskExtensionLoader workflowTaskExtensionLoader, WorkflowApprovalExtensionLoader workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensions(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine..ctor(String metadataDirectory, String sqlConnectionString, SyncOptions options)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
Log level - Error | Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadCrossAssemblyDuplicateException: Runtime metadata is invalid because the same metadata artifact has been defined in multiple assemblies. \nFirst 10 conflicting names: DocWHSDocumentRoutingPrinterEntity. \nSee metadata events for complete list.
   at Microsoft.Dynamics.AX.Metadata.Storage.ErrorReportingHelper.ThrowMetadataReadCrossAssemblyDuplicateException[T](IList`1 artifactNames, IDictionary`2 modulesToArchives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1.GetPrimaryKeysNoCache()
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1..ctor(RuntimeProviderConfiguration configuration, RuntimeModelManifestProvider modelManifestProvider, IDictionary`2 archives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeMetadataProvider..ctor(RuntimeProviderConfiguration configuration, Boolean extensions, ExtensionLoader`1 formExtensionLoader, ExtensionLoader`1 tableExtensionLoader, ExtensionLoader`1 enumExtensionLoader, ExtensionLoader`1 menuExtensionLoader, ExtensionLoader`1 securityRoleExtensionLoader, ExtensionLoader`1 securityDutyExtensionLoader, ExtensionLoader`1 dataEntityViewExtensionLoader, ExtensionLoader`1 edtExtensionLoader, ExtensionLoader`1 viewExtensionLoader, ExtensionLoader`1 querySimpleExtensionLoader, ExtensionLoader`1 menuItemDisplayExtensionLoader, ExtensionLoader`1 menuItemActionExtensionLoader, ExtensionLoader`1 menuItemOutputExtensionLoader, ExtensionLoader`1 workflowTemplateExtensionLoader, ExtensionLoader`1 workflowTaskExtensionLoader, ExtensionLoader`1 workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensionsUpdated(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader, WorkflowTemplateExtensionLoader workflowTemplateExtensionLoader, WorkflowTaskExtensionLoader workflowTaskExtensionLoader, WorkflowApprovalExtensionLoader workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensions(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine..ctor(String metadataDirectory, String sqlConnectionString, SyncOptions options)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
Database synchronization completed (9869 ms). Errors found.
Log level - Error | Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadCrossAssemblyDuplicateException: Runtime metadata is invalid because the same metadata artifact has been defined in multiple assemblies. \nFirst 10 conflicting names: DocWHSDocumentRoutingPrinterEntity. \nSee metadata events for complete list.
   at Microsoft.Dynamics.AX.Metadata.Storage.ErrorReportingHelper.ThrowMetadataReadCrossAssemblyDuplicateException[T](IList`1 artifactNames, IDictionary`2 modulesToArchives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1.GetPrimaryKeysNoCache()
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1..ctor(RuntimeProviderConfiguration configuration, RuntimeModelManifestProvider modelManifestProvider, IDictionary`2 archives)
   at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeMetadataProvider..ctor(RuntimeProviderConfiguration configuration, Boolean extensions, ExtensionLoader`1 formExtensionLoader, ExtensionLoader`1 tableExtensionLoader, ExtensionLoader`1 enumExtensionLoader, ExtensionLoader`1 menuExtensionLoader, ExtensionLoader`1 securityRoleExtensionLoader, ExtensionLoader`1 securityDutyExtensionLoader, ExtensionLoader`1 dataEntityViewExtensionLoader, ExtensionLoader`1 edtExtensionLoader, ExtensionLoader`1 viewExtensionLoader, ExtensionLoader`1 querySimpleExtensionLoader, ExtensionLoader`1 menuItemDisplayExtensionLoader, ExtensionLoader`1 menuItemActionExtensionLoader, ExtensionLoader`1 menuItemOutputExtensionLoader, ExtensionLoader`1 workflowTemplateExtensionLoader, ExtensionLoader`1 workflowTaskExtensionLoader, ExtensionLoader`1 workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensionsUpdated(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader, WorkflowTemplateExtensionLoader workflowTemplateExtensionLoader, WorkflowTaskExtensionLoader workflowTaskExtensionLoader, WorkflowApprovalExtensionLoader workflowApprovalExtensionLoader)
   at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensions(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine..ctor(String metadataDirectory, String sqlConnectionString, SyncOptions options)
   at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
syncengine.exe exited with code -1.

It most probably means that you have not deleted the now deprecated Docentric AX License Plate Labels model, while also having installed the new Docentric AX Warehouse Labels model.

To fix this, please delete the Docentric AX License Plate Labels model by following these steps:

  1. Stop the IIS server and the Batch service:
iisreset -stop



2. Delete the obsolete model from disk:

3. Refresh the models in Visual Studio:
image
4. Delete and commit the deletion of the obsolete model to source control:

image
5. Build and Sync as usual.
image

image

6. Start the IIS server and the Batch service:

iisreset -start


Deployable package missing the DocentricAxLicensePlateLabels module

When uploading a deployable package you might get the following error message:


Transcript:

The selected package is missing the following modules that
are currently deployed on your environment. You must
create an all-in-one deployable package that contains all
your code customizations and ISV solutions. More
information can be found at the following link:
https://go.microsoft.com/fwlink/?linkid=2118104. Missing
module(s): [“docentricaxlicenseplatelabels”]

To fix this, please follow these instructions (the original instructions can be found at the link from the error message):

  1. Create a file that is named ModuleToRemove.txt.

  2. In the file, put the name of the module to remove, in this case docentricaxlicenseplatelabels.
    image

  3. Create a valid deployable package, and put the ModuleToRemove.txt file in the \package\AOSService\Scripts folder.

  4. Upload the package to the Lifecycle Services asset library. Wait for the asset to finish validation, and review any warnings that are shown on the Asset Details panel on the right side of the page.

  5. Install the deployable package. For more information about how to install deployable packages, see Apply updates to cloud environments.

  6. Verify that the package was uninstalled before you complete this procedure in a production environment.