Developer forum

Forum » Development » DW8 Upgrading - CustomFields prop on NewsItem always 0

DW8 Upgrading - CustomFields prop on NewsItem always 0

Kim SĂžjborg Pedersen
Reply
 I just upgraded a solution and the only thing I don't can solve is this problem

I have a Dynamicweb.Modules.News.NewsItem newsItem = new Dynamicweb.Modules.News.NewsItem(newsID);

and newsItem.CustomFields is always 0. Is it a bug or is there another way to get the customfields on a news object?


Replies

 
Morten Bengtson
Reply
This post has been marked as an answer
Try this...
var newsItem = new Dynamicweb.Modules.News.NewsItem(newsID);
newsItem.FillCustomFields();
It would be nice if the collection was loaded automatically the first time you access the custom fields on the item, but I guess we have to live with this weird solution for now.

/Morten
Votes for this answer: 0

 

You must be logged in to post in the forum