Error code deciphering: ways to get the error description in Data Import Failure and Unified Interface Error Message Popup

When you encounter an error in Dynamics 365, the error is usually presented by an error code followed by a short error description that describes what went wrong. However, that is not always the case, there are instances where you will only be presented with an error code and no description of the error at all, and that is not helpful in identifying what had gone wrong.

Below are 2 scenarios I have encountered where I was only presented with an error code, followed by a couple of options on what to do and where you can get the description of the error codes pertaining to the scenarios.

Scenario 1

When importing data using Dynamics 365 Data Import Wizard, you will sometimes encounter an error for some of the records being imported. When you check the Import record, the system opens up the Import Source File form in Unified Interface and the description column is empty for the Failure records for some reason as in the screenshot below. With just an error code, it is not easy to figure out what is wrong with those failed records.



Scenario 2

When certain contact records are selected as Attendees in the Appointment form in Unified Interface, the following error message shows up upon saving the record. I raised a ticket with Microsoft support and we finally found out that the issue was caused by an invalid email address of those Contacts. If the system shows a proper error message, we could have easily figured out the root cause of the issue without spending time troubleshooting with the support engineer.



Here's the solution if you encounter similar issues described above.

🔗 Option 1

One of the options to decipher those error messages is to refer to the Microsoft docs about the web service error codes.
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/org-service/web-service-error-codes
For Scenario 1, the error code is -2,147,220,653 and the following error message can be found in that documentation.
The lookup reference could not be resolved

🔗 Option 2

Another option is to access the legacy web client version of the form to see the proper error message by appending "&forceClassic=1" at the end of the URL.
e.g. the URL of the Import Source File URL from Scenario 1 is
https://contoso.crm.dynamics.com/main.aspx?newWindow=true&pagetype=entityrecord&etn=importfile&id=00000000-0000-0000-0000-000000000000
the URL for legacy web client will be
https://contoso.crm.dynamics.com/main.aspx?newWindow=true&pagetype=entityrecord&etn=importfile&id=00000000-0000-0000-0000-000000000000&forceClassic=1
In the legacy web client, the proper error message can be found.





The generic error in the Unified Interface above will be shown as a more meaningful error in the legacy web client.





Insufficient Permissions

You do not have {0} permission to access {1} records. Contact your Microsoft Dynamics 365 administrator for help.

The permission error dialogue with the placeholder string {0} {1} in Unified Interface will be shown with a proper values User ID and missing privilege in the legacy web client. (and even the button to download the log file)

🔗 Option 3

Open the browser developer tools by pressing (F12 or Ctrl + Shift + I), focus on Network tab, reproduce the error and look for the error in red with status 403.

Clicking on the web request with an error will show the detailed error message in the Response tab.


Comments

Popular Posts