Posted on 03/06/2024 13:46:49
Hi Davy,
It can be in the codeunit. But now after some more investigation I am not sure if it is a bug.
Are you using the latest version of it 1.2.0.19 for NAV2018?
I was looking on this issue with trying to get it reproduced in the D365BC and failed to make a setup like you have in your response.
So if the Attribute in the BC is type of type Text then you can not specify its value in different languages on the product, see the image below for the Material Description field:
The response looks like that:
<item table="EcomProductCategoryFieldValue">
<column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_5]]></column>
<column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column>
<column columnName="FieldValueProductId"><![CDATA[1896-S]]></column>
<column columnName="FieldValueProductVariantId"><![CDATA[]]></column>
<column columnName="FieldValueProductLanguageId"><![CDATA[ENU]]></column>
<column columnName="FieldValueValue"><![CDATA[Wood123]]></column>
</item>
So I have not any way how to have the value Wood123 to be translated into different languages:
When the Item attribute is of type List of Options then you can specify the each option translation name:
but in the response xml it has the integer number in the value:
<item table="EcomProductCategoryFieldValue">
<column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column>
<column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column>
<column columnName="FieldValueProductId"><![CDATA[1896-S]]></column>
<column columnName="FieldValueProductVariantId"><![CDATA[]]></column>
<column columnName="FieldValueProductLanguageId"><![CDATA[ENU]]></column>
<column columnName="FieldValueValue"><![CDATA[8]]></column>
</item>
and it corresponds to those records in the output xml:
<item table="EcomFieldOption">
<column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_8]]></column>
<column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column>
<column columnName="FieldOptionName"><![CDATA[Black]]></column>
<column columnName="FieldOptionValue"><![CDATA[8]]></column>
</item>
<item table="EcomFieldOptionTranslation">
<column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_8]]></column>
<column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[ENU]]></column>
<column columnName="EcomFieldOptionTranslationName"><![CDATA[Black]]></column>
</item>
<item table="EcomFieldOptionTranslation">
<column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_8]]></column>
<column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DEU]]></column>
<column columnName="EcomFieldOptionTranslationName"><![CDATA[Black DEU]]></column>
</item>
Let me know how is your attribute is setup in NAV, is it a Text or List of options? Do you use our standard codeunit for NAV without changes?
BR, Dmitrij