Developer forum

Forum » Development » ItemType Code First Item Type parameters

ItemType Code First Item Type parameters

Tom Kamphuis
Reply

Hi guys,

Does anybody know how to set the Item Type parameters on an item type field from code first? This is my current code for the field:

[Group(StringConstants.ItemTypeConstants.StandardFields)]
        [Field(StringConstants.ItemTypeConstants.FairName, typeof(ItemTypeEditor))]
        [Required]
        public Fair Fair { getset; }

Attached as an image are the settings in the CMS that I would like to see set from code.

Cheers!
Tom

ItemTypeCodeFirst.jpg

Replies

 
Nicolai Høeg Pedersen
Reply

I think it is the ItemRelationList attribute

 
Tom Kamphuis
Reply

ItemRelationList isn't a known attribute according to the IDE (or documentation). I can find a ItemRelationListEditor but it seems not to be supported according to Vladimir in this forum thread: http://developer.dynamicweb.com/forum.aspx?ThreadID=40291. Any other suggestions?

 
Tom Kamphuis
Reply

Hmm... I've tried different approaches but none of them seem to work. I couldn't find the ItemRelationList attribute, or should I refference some assembly? For now we'll switch to a handmade ItemType while those can be set to have another Item Type as a field but it would be nice to see this working from code first Item Types.

Cheers,
Tom

 
Vladimir
Reply
This post has been marked as an answer

Hi Tom,

Sorry, I missed to merge these attributes to 8.6.1(only in 8.7) - had made this now

Best regards,

Vladimir

Votes for this answer: 1
 
Tom Kamphuis
Reply

Thanks Vladimir! Would this be released with the next 8.6.1.* release? And I guess I should use the ItemRelationList attribute right?

 
Nicolai Høeg Pedersen
Reply

Hi Tom

Yes it will be with 8.6.1

 
Merethe Vrå Andersen
Reply
This post has been marked as an answer

Hi

It's fixed in the next hotfix (8.6.1.12).

/Merethe

Votes for this answer: 1
 
Kristian Kirkholt
Reply

Hi Tom

The problem TFS#17468 regarding "ItemTypeEditor support in code first" has now been fixed in version 8.6.1.12

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum