Dynamics 365 – Import has encountered an error and has been canceled. Your system has been restored to its original state. This customization file contains a reference to an entity map that does not exist on the target system.

Dynamics CRM – Javascript Xrm.Page.ui.getFormType()
October 6, 2017
Dynamics CRM – Dyn365 Data (Online) to Azure (Online) to Dynamics 2016 on premise
October 12, 2017

Dynamics 365 – Import has encountered an error and has been canceled. Your system has been restored to its original state. This customization file contains a reference to an entity map that does not exist on the target system.

Ran into an interesting issue when trying to import a solution into both Dynamics 365 on premise and Dynamics 365 online. Background: Did some major tweaking to some OOTB processes and decided to turn them off/deactivate them. Honestly can’t remember exactly how I broke it. But the fix is simple.

The exact error:

Import has encountered an error and has been canceled. Your system has been restored to its original state. This customization file contains a reference to an entity map that does not exist on the target system.

The solution to this is as followed:

  1. (Optional) Move the broken solution into a folder where you can extract and manage the files.
  2. Extract the solution file.
  3. Open the customisations.xml file.
  4. Search for parts of the “Name” within the customisations file, in my case I searched for “toop” (With only 1 occurrence) which looked like:

This piece of XML was causing the issue. The EntityTarget did not exist anywhere else and was causing the problem.

  1. Delete the above XML section from the customisations.xml file.
  2. Save the file.
  3. Copy the new xml file into the original downloaded solution.
  4. Re-Import the solution back into CRM.

Solution should now import.

From here onwards: Make sure you do any sort of patching as a patch.

Jason
Jason
I do things in the clloouuudddd