Developer forum

Forum » Ecommerce - Standard features » Field Options for ProductCategoryFields

Field Options for ProductCategoryFields

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have noticed recently a data structure used for product fields options and I was wondering if it can be used for ProductCategory fields as well, instead of the current <Options></Options> approach.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

Can you please ellaborate. I am not sure I understand what you are looking for.

Thanks, Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

For ProductCategoryFields of type List we are storing values in the table EcomProductCategoryFieldTranslations in a "select" like format:

<Options><Option Name="Option 1" Value="1" Default="" /><Option Name="Option 2" Value="2" Default="" /></Options>

For ProductFields of type List, we are storing the options in a table called EcomFieldOptions as individual lines.

I have often found the method for ProductCategoryFields to be prone to errors when mass importing data into it as the xml content can easily break and it is also complicated when a field has a lot of options.

The ProductField approach seems more flexible and extendable and it can also encourage the development of custom type fields that could eventually support a type-ahead approach (for fields with a lot of options).

 

Does it make sense?

Thank you,

Adrian

 

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Anything on this subject?

And to support even more the reason behind my question, we have just started an NAV integration and we tried to retrieve the product with Product properties (importProductProperties="true") and we got this error message back:

An error occurred processing the request. Exception: The length of the string is 1863, but it must be less than or equal to 1024 characters. Value: <Options><Option Name="280cm" Value="20" Default="" /><Option Name="290cm" Value="21" Default="" /><Option Name="300cm" Value="22" Default="" /><Option Name="260cm" Value="23" Default="" /><Option Nam...

It seems to be related to the way the ProductCategoryFieldOptions are retrieved.

Thank you,

Adrian 

 
Nicolai Pedersen
Reply

No news!

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Ok. Got it.

I will have to find a solution on my own in this case as it seems that I am, once again, the only one with this issue.

Thank you,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have mentioned above an error message that we get when trying to retrieve Products with attributes from NAV:

An error occurred processing the request. Exception: The length of the string is 1863, but it must be less than or equal to 1024 characters. Value: <Options><Option Name="280cm" Value="20" Default="" /><Option Name="290cm" Value="21" Default="" /><Option Name="300cm" Value="22" Default="" /><Option Name="260cm" Value="23" Default="" /><Option Nam...

It seems to be related to the way the ProductCategoryFieldOptions are retrieved.

I am not sure if the error message is returned by the CodeUnit or the connector but it is surely returned by one of them.

There is no way we can shorten the string since those are the actual values used for the options of that field. And there are few more fields in a similar situation.

We are using LiveIntegration V2 with NAV 2018 and DW 9.8.9.

Is this a known issue of the Integration Framework? Is there any way around this error?

Thank you,

Adrian

 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
yes, it seems like a bug in the NAV CodeUnit. Could you import and try with the version attached here?
Kind regards, Dmitrij

 

You must be logged in to post in the forum