Developer forum

Forum » Development » Force display of Field Display group on products

Force display of Field Display group on products

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I need a workaround for handling display of FieldDisplayGroups on a product.

My intention is to store some field displaygroups at Product level (in a custom field) and I would like to force the display of those FieldDisplayGroups on the product whenever the product is opened and ideally regardless of the structure the product is opened from (Query, Warehouse etc). Something like a Default View of fields.

Is there any way I can accomplish this?

Thank you,

Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

I would expect you could use the API to get FieldDisplayGroups. That's how we were doing it prior to having the checkbox to display in the frontend and tags. Get the value of your custom field and then you can use Services to get the FieldDisplayGroup.

 

Here's a quick snippet:

var myFieldDisplayGroupBySystemName = Dynamicweb.Ecommerce.Services.FieldDisplayGroups.GetBySystemName("FieldDisplayGroupSystemName");
var myFieldDisplayGroupById = Dynamicweb.Ecommerce.Services.FieldDisplayGroups.GetById(0);

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Thank you for your suggestion.

Unfortunately, my post was not clear enough. My problem is in the back-end interface when editing a product.

Fortunately, I have found a workaround and I am now forcing the user to open the product from the query.
This allows me to set the field display group(s) to be used in the interface.

Thank you,

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Just glad you found a solution

 

You must be logged in to post in the forum