Developer forum

Forum » Integration » Integration - custom product fields

Integration - custom product fields

René Poulsen
Reply

Hi,

I'm working on a solution with integration to NAV. All the products we have to import have a lot of custom fields. I've created all the fields in DW (the systemname is the same as in NAV).

Let's say we have a "ProductColor" field. When a product has a color value, this node is added to the <item table="EcomProducts"> node for the given product:

<column columnName="ProductColor"><![CDATA[Black]]></column>

When a product doesn't have a value for ProductColor this node isn't added at all. Then, when I try to run the import i get the following error in the log:

[EcomProducts] can not get a value for the column: [ProductColor]. The input rows is: ...

Is this because the database needs the value because the column is not nullable, or is it because of the Ingration Framework? Does it expect values in all custom fields?


Replies

 
Jonas Krarup Dam
Reply

Hi,

When using the Data Integration for importing data, every row must have all values - that is, every row should have the same values.

(technically, every row should have at least the same columns as the first row, as that is the one that is used for defining the schema for the xml file. But you will get the best result if you make sure that every row has the same columns.)

If you need to import null, you should include the following in your xml:

<column columnName="ProductColor" isNull="true"/>

If you have columns missing you will get that error.

Regards, Jonas
 

 
René Poulsen
Reply

Okay, so there is no way to get around this, other than adding the node with the isNull attribute set to true?

 

 
Jonas Krarup Dam
Reply

I can't think of any way to get around it without implimenting custom code. Including the node with out any content will result in inserting an empty string - but it has to be there.

 
René Poulsen
Reply

Okay, I'll talk to the NAV partner about just adding nodes with empty string, when no data is present on the product.

 

You must be logged in to post in the forum