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

Forums / Developing with Sitefinity / How to get filter dynamic module by UrlName property

How to get filter dynamic module by UrlName property

2 posts, 0 answered
  1. Ajai
    Ajai avatar
    15 posts
    Registered:
    02 Mar 2015
    10 Sep 2015
    Link to this post

    Hi team,

    I am working in sitefinity 8.1.

    I have creted a dynamic module and i want to get items based on the "UrlName " property.The code that i have tried is given below.

       var dynamicCasestudyItems =
    dynamicModuleManager.GetDataItems(mycaseStudyType).Where(p =>
    p.Status.Equals(ContentLifecycleStatus.Live) &&
    p.Visible.Equals(true) &&
    p.UrlName.Equals(mycaseStudyUrl)).FirstOrDefault();

     

    But i am getting the following error.Any idea on this?

    Unknown parameter.
    Parameter name: parameterExpression
    Actual value was p.

    Please let me know what i am wrong with my code.

     

    Thanks

  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    06 Dec 2016
    12 Oct 2015
    Link to this post
    Hi,

    Would it be possible for you to check whether mycaseStudyUrl is a string value?

    Regards,
    Stefani Tacheva
    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
     
2 posts, 0 answered