Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

MetaStringDictionary property from code


I am creating a site with EPiServer Commerce 7.5 and I want to declare my variation metaclass from code.

Everything works fine except I have two fields that is of the StringDictionary in Commerce.

How do i declare those properties and decorate them so that they are interpreted as the type stringdictionary?

As of i now i have only done this:

[Display(Name = "OffersText")]
public virtual MetaStringDictionary OffersText { get; set; }

But I get the following error:

The type Mediachase.MetaDataPlus.MetaStringDictionary can not be mapped to a MetaDataType

I have also tried wth the type StringDictionary but i get the following error.

May 07, 2014 10:50


In 7.5, the dictionary types are not supported by Catalog contents. You need to update to latest nuget package (7.7.2 or later) to enable the support.



May 08, 2014 7:16

Thanks for replying.

I have updated project through nuget and it is still not working. Is it sufficient just declaring the property like above, or do I need to decorate the property with a specific attribute?

I have version of Mediachase.

May 08, 2014 9:18

I'm sorry to read it too fast. The dictionary types we're supporting are Single and Multi dictionary. The StringDictionary, as it has some special characteristics, will not be supported for now - You'll need to edit it via CM.

Thank you.


May 08, 2014 10:15

Ok, so I will not be able to handle the string dictionary as Content. The reason is that I am writing an import job, that creates variantions and add them to the catalog. So basically I would need to either change the datatype to a multivalue dictionary. Or handle the standard properties as content and then pull out the old trusted MetaHelper and edit them the same way as before.

May 08, 2014 10:25

So how do you decorate the property for Single and Multi dictionary? Neither of following is working:

public virtual MetaDictionary SchoolType { get; set; }

public virtual DictionarySingleEditorDescriptor MySingleDictionaryProperty { get; set; }

Can't seem to find any info on what to use for the Dictionary properties?

I'm running Commerce 7.7.


Nov 03, 2014 13:56

Found it:

public virtual string MyTestDictionary { get; set; }

public virtual ItemCollection<string> MyTestMultiDictionary { get; set; }


Nov 03, 2014 14:08
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.