Connector -- Integrating Dynamics ERP with Dynamics CRM

Connector for Microsoft Dynamics is an integration solution which is targeted specifically at the Microsoft Dynamics product family. Connector provides an out of the box integration between Dynamics CRM and Dynamics ERP solutions.

If you encounter an "Invalid Character" error in your Microsoft Dynamics NAV integrations, here is a troubleshooting tip

If you encounter an "Invalid Character" error in your Microsoft Dynamics NAV integrations, here is a troubleshooting tip

Rate This
  • Comments 2

Microsoft Dynamics NAV allows characters in its string fields that might not be compatible with the XML standards used by the .NET XML serializer.  If you encounter errors in you integrations that state invalid XML data or invalid characters have been encountered, here is a tip from our Microsoft Dynamics NAV support engineers on how to find the records that need fixing within Microsoft Dynamics NAV.

In the Connector for Microsoft Dynamics log it is mentioned which map is causing the trouble. In my scenario it was the Microsoft Dynamics NAV Contact to Contact map which means it is table 5050 Contact we need to have a look at. While I was trying to narrow down the faulty records, I synched in batches. That did work fine (though the check for data modified after stopped working and no old data synched). That resulted in having me to update data directly in the SQL Server table. Then I found some empty name fields records. That is how I found out this is where I had to do some cleaning. 

So, I ran the following query (this will find contact who's names are blank, you could also supply the invalid characters that you are looking for as well to this script):

USE DatabaseName

GO

SELECT * FROM DatabaseName$Contact WHERE Name =  ’’ 

With SQL Server management studio you can easily scroll through the list and search for the obvious required field names that are supposed to be there. 

E.g.:

SELECT COUNT(*) FROM DatabaseName$Contact WHERE Name = ’’ 

That returned 4.

SELECT * FROM DatabaseName$Contact WHERE Name =  ’’ 

Then you have it and you can easily delete them:

DELETE FROM DatabaseName$Contact WHERE Name = ’’ 

After that, everything seemed to be running as normal.

PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the link in the Related Links section (scroll up, on right hand side) to ask on the Dynamics Communities. If you ask on the Communities, others in the community can respond and the answers are available for everyone in the future.
Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post
  • How about, instead of just deleting them, you check them and actually give them a name? Also maybe use the interface of NAV to delete them so the proper business logic may trigger.

  • @Sebastiaan - yes that will work as well.

Page 1 of 1 (2 items)