When running a SmartConnect map, receiving an error on each transaction that says “Input string was not in a correct format” or “Failed to convert parameter value”
This indicates that a value being passed into eConnect is not using the correct data type. For example, passing a string into an integer field, or passing an integer into a date field. In order to troubleshoot this issue, you need to determine what value is using an incorrect data type. Follow these steps to troubleshoot the error:
1. Download the eConnect Programmers Guide from this link: eConnect Programmers Guide. The file you want to download is named eConnectProgrammersGuide.chm
2. In your SmartConnect map, change the destination from Microsoft Dynamics GP to Microsoft Dynamics GP – File. Point the Destination Path to somewhere on the local hard drive.
3. Run the map, it will generate XML documents in the location you specified. The XML documents are what SmartConnect is sending to eConnect.
4. You will see the names if the eConnect nodes in there along with all the data elements being set to the node. All the node names start with ta. So for example the node that creates SOP Headers is named taSopHdrIvcInsert. Once you find the node name, lookup that exact node name in the eConnectProgrammersGuide.chm file. Look under the XML Node Reference for the node of the same name.
5. Once you have the node open, look at all the element names and the data types for the elements. Compare them to the data that is in your XML file. If it’s saying “Failure to convert string to Int” then you know you only have to look at the elements that are Integer data types and see if there is anywhere a string is being passed to them. Typically this will enable you to find the field that is causing the issue. You also may be running into an issue with an eConnect Pre or Post procedure. If the Pre or Post procedure has SQL script that is returning errors, they will show up in the SmartConnect errors as well.