In Dynamics 365, we have the option to modify the charts by changing its XML. I recently created a new custom chart in Dynamics 365, and I had to modify its XML based on my requirements. However, during the solution deployment to another instance, the deployment kept on failing. Following is the message that was being displayed.

image

In the log file, there was a message that says “The 'distinct' attribute is not declared”. It was happening because of the chart which I had customised the XML for. That chart was also a component of the solution that was getting deployed. While modifying the XML of that chart I added the keyword ‘Distinct’. Following are the steps for workaround this issue:

  1. Export the solution with the chart which isn’t using Distinct keyword.
  2. Import the solution in the target instance.
  3. Import the chart with Distinct keyword in both instances. In my case, I imported the charts to and from the same solution that I deployed.

image

After following the steps above, I was able to successfully deploy the solution and the charts in the target instance.