I’m running a SmartConnect 21 integration to Microsoft Dynamics GP using a custom node created with Node Maintenance.
SmartConnect recognizes the node and the fields, and everything maps properly, but when running the map, SmartConnect fails on every record with the error:
The ‘ ‘ character, hexadecimal value 0x20, cannot be included in a name
What causes this error and how to resolve it?
If you’d rather watch a video explaining this, click here.
When running a map to a Dynamics GP Destination, SmartConnect generates the eConnect XML according to the definition of the node as defined in Node Maintenance.
Here a new “Group” named Custom was added and then a new Node Type Name was added of value “New Node Type”. The same display name of “New Node Type” was given to it and we see that under the Custom group in the screenshot. The Group and the node Display Name are OK having spaces in it – those are just for “display” purposes in SmartConnect.
However, the “Node Type Name” is used in the output eConnect XML and the spaces in the name are an issue because XML node names cannot contain spaces and the exact error that is given by SmartConnect as it constructs that output eConnect XML.
It is not possible to hand type the name with spaces in it, but you can import it in if you edit the import json – or I found that if you copy & paste the name with spaces in that also will be allowed.
Once saved, the Node Type Name is no longer editable and so we would either have to delete it or easier, fix it on the back end in the SmartConnect database.
The MsGpNodeType table is used to define it and is from the window we saw in Node Maintenance.
As the node was used on a map, the broken name is also used in the DestinationBase table – we need to fix them both.
Exit SmartConnect
Run the following SQL code in SSMS against the SmartConnect database to remove the spaces in the name – I chose to replace with underscores
/* replace New Node Type with the name of your broken node type name */ declare @nodeTypeName varchar(510) = 'New Node Type' update MsGpNodeType set Name =replace(@nodeTypeName,' ','_') where Name = @nodeTypeName update DestinationBase set NodeTypeName = replace(@nodeTypeName,' ','_') where DestinationType = 'Gp' and NodeTypeName = @nodeTypeName /* and verify that looks fixed */ select * from MsGpNodeType where Name = replace(@nodeTypeName,' ','_') select NodeTypeName,* from DestinationBase where NodeTypeName = replace(@nodeTypeName,' ','_') and DestinationType = 'Gp'
After replacing both names with the above code, relaunch SmartConnect and we find the map ran normally and no longer gets this error.