How to query related data through API - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to query related data through API

  • How to query related data through API
  • I have 2 dynamic modules that I created in Sitefinity 7 using the dynamic module builder- movies and actors. These dynamic types are related through module builders "RelatedData" field.

    A "Movie (Dynamic Type)" has a "Related Data" field to the "Actors (Dynamic Type)".  I also have a number of other related data types for a movie.

    I am building an MVC widget that needs to display the related "Actor (Dynamic Type)" actors for the specified "Movie" page that the user is on.

    How can I retrieve the related "Actors" for the movie? I would like to do this programatically with c# code.  I am not familiar with how to use  the "RelatedDataService" via the REST services.

    A code sample would be helpful. I've already read

  • Hello Aaron,

    We have answered you with details in the support ticket.
    You can query the related data items, which are items built with the module builder, as well this way:
    Then you can use GetValue() method to get the values of each of the properties for every item in the above returned collection:

    Nikola Zagorchev
    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