ER migration cleanup

Important

Dynamics 365 for Finance and Operations has evolved into purpose-built applications to help you manage specific business functions. For more information about these changes, see Dynamics 365 Licensing Guide.

When you manage your Finance instances, you might decide to migrate your current instance to another location. For example, you might migrate your production instance to a new sandbox environment. If you configured the Electronic reporting (ER) framework to store templates in Microsoft Azure Blob storage, the DocuValue table in the new sandbox environment refers to the instance of Blob storage in the production environment. However, this instance can't be accessed from the sandbox environment because the migration process doesn't support the migration of artifacts in Blob storage. Rather, it's expected that in the new sandbox environment, you refer to the instance of Blob storage in the sandbox environment that does not yet obtain the ER templates.

If you try to run an ER format that uses a template to generate business documents, an exception occurs, and you're notified about the missing template. You're also guided to use the ER migration cleanup option to delete and then re-import the ER format configuration that contains the template.

Running an ER format

You will receive a similar error if you navigate to the Configurations page (Organization administration > Electronic reporting > Configurations) and in the configurations tree, try to delete an ER format configuration that uses a template.

Deletion an ER format

Complete the following steps to resolve issues with ER templates that you are unable to access.

  1. Go to Organization administration > Periodic > Migration cleanup page.
  2. Select an ER format configuration that can’t be executed or deleted.
  3. Select Delete.
  4. Confirm the deletion of the selected ER format configuration.
  5. Import the deleted ER format configuration to the current Finance instance.

Applicability

[Important] The Migration cleanup option is targeted only for ER format configurations that contain non-accessible ER templates. When you delete an ER format configuration by using the Migration cleanup option, ER deletes the templates that are related to the configuration artifacts in the only application database. The existence of the appropriate physical files in Blob storage are not validated. Instead, it is assumed that there are none. Therefore, do not use the Migration cleanup option as an alternative to the ER configuration deletion option on the Configurations page. Use the Migration cleanup option only when the ER configuration deletion option on the Configurations page failed.

If you use the Migration cleanup option to delete an ER format configuration when the referred template is available in the Blob storage, you only delete related configuration artifacts in the application database. The physical file of the template in the Blob storage remains. File overwriting in Blob storage is no longer allowed. For more information, see KB4557217. Additionally, you will no longer be able to re-import the configurations deleted by using the Migration cleanup in this environment. To resolve this issue, you need to find the corresponding file in Blob storage and manually delete it.

Importing an ER format

A similar issue may occur if you migrate your application instance to another location that has been used as a migration target more than once and for which the Blob storage already contains ER template files.

Because you can have several ER format configurations, this process can be time consuming. Therefore, using the Backup storage of ER templates feature to automatically recover templates with broken references is preferred.