+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Find custom fields from List Items using Fluent API

Find custom fields from List Items using Fluent API

7 posts, 0 answered
  1. Harshil
    Harshil avatar
    5 posts
    Registered:
    19 Mar 2014
    11 Jul 2014
    Link to this post

    Hi,

    I would like to get a particular field which is created by me as custom field in list item using Fluent API. But I am not able to get it through Fluent API or I did not find any way to do it. Any help is appreciated.

     Regards,

    Harshil Shukla 

  2. Harshil
    Harshil avatar
    5 posts
    Registered:
    19 Mar 2014
    14 Jul 2014
    Link to this post

    Hi All,

    I got my answer from this link :- http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/how-are-custom-fields-in-lists-modules-accessed-through-code-behind

    Thanks,

  3. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    16 Jul 2014
    Link to this post
    Hi Harshil,

    I am glad you have found the solution. You can use the extension methods GetValue, GetValue<T> and SetValue() for working with custom fields. The extension methods are part of the Telerik.Sitefinity.Model, so you should include this namespace in order to use them.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Harshil
    Harshil avatar
    5 posts
    Registered:
    19 Mar 2014
    16 Jul 2014
    Link to this post

    Hi Nikola,

    Thanks for your reply. And definitely it has helped me a lot.

     Regards,

    Harshil Shukla 

  5. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    21 Jul 2014
    Link to this post
    Hello Harshil,

    I am glad you have managed to solve this out. Contact us if we can help you further.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  6. Ed
    Ed avatar
    20 posts
    Registered:
    26 Mar 2013
    10 Apr 2015
    Link to this post
    GetValue() definitely does not work for obtaining values of custom fields.
  7. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    24 Nov 2016
    14 Apr 2015
    Link to this post
    Hi Ed,

    The GetValue is the method to get a value of a custom field. You can find more information here and here.
    In your case, your custom field with name 'areaOfStudy' is not found in the PageData object. Please, check whether the field name is correct and your custom field is not added to another type, PageNode in your case maybe.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
7 posts, 0 answered