Developer forum

Forum » Integration » Data Type mismatch

Data Type mismatch

Michael Knudsen
Reply

Hello forum

- we are connecting to BC and to get customers etc., but once the import runs we a getting an error:
2022-08-03 08:15:30.785: Starting import to temporary table for AccessUserSecondaryRelation.
2022-08-03 08:15:30.816: Import job failed: Cannot parse 'MKE' to System.Int. Table: AccessUserSecondaryRelation. Column: AccessUserSecondaryRelationUse
rID The failed input row is: [AccessUserSecondaryRelationUserId:"MKE"], [AccessUserSecondaryRelationSecondaryUserId:"E10055"]
2022-08-03 08:15:30.816: Job failed.

I assume the value (MKE) in AccessUserExternalID are used to connect the data in tables AccessUser, AccessUserSecondaryRelation and AccessUserAddress, but AccessUserExternalID is nvarchar(25) in AccessUser and in AccessUserSecondaryRelation and AccessUserAddress it's required to be an int.

What would be the best solution to overcome this error?

 

Request:
<GetEcomData><tables><Customers type="all" importSalesPeople="true" importContacts="true"/></tables></GetEcomData>

Response (extract):
<tables version="1.2.0.22_NAV20.0.42653.44283">
    <item table="AccessUser">
      <column columnName="AccessUserUserName"><![CDATA[MKE]]></column>
      <column columnName="AccessUserExternalID"><![CDATA[MKE]]></column>
      ...
    </item>
    <item table="AccessUserSecondaryRelation">
      <column columnName="AccessUserSecondaryRelationUserId"><![CDATA[MKE]]></column>
      <column columnName="AccessUserSecondaryRelationSecondaryUserId"><![CDATA[E10055]]></column>
    </item>
    <item table="AccessUserAddress">
      <column columnName="AccessUserAddressUserID"><![CDATA[E10055]]></column>
      <column columnName="AccessUserAddressType"><![CDATA[1]]></column>
      ...
    </item>

 

Br. Michael Knudsen

 


Replies

 
Carolee Schuck Dynamicweb Employee
Carolee Schuck
Reply

Hey Michael,

We use a tablescript in the mapping job to look up the AccessUserId using the AccessUserExternalId from the incoming data.  If that's of interest to you, lmk!

Carolee

 
Michael Knudsen
Reply

Hello Carolee,

- it could be useful to see/get the tablescript you are using to overcome this issue, but do you have the same tablescript on all 3 tables or do you have 3 different tablescripts?

Even it might be a solution to add tablescripts, I hope Dynamicweb would come with a response on this topic.

Br. Michael Knudsen

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Michael,
I don't know what destination provider do you use to import the data. But can you try to use the UserDestination provider if it is not it?
Also in the User provider settings set the "User key field" option to "AccessUserExternalId" or "Auto".
BR, Dmitrij

Votes for this answer: 1
 
Michael Knudsen
Reply

Hello Dmitriy,

- we are using the User Provider, but couldn't get it to work with "User key field" = "Auto", but after changing it to "AccessUserExternalId" the import job runs smoothly.

Thanks for for advise!

Br. Michael Knudsen

 

You must be logged in to post in the forum