web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Retrieving data from multiple entity.

(0) ShareShare
ReportReport
Posted on by

Hi,

I have an entity name called "Event" and it has two 1:N relation which entities names are "Registration" and "Schedule" and one N:N relation with entity name "Speaker" Now I want to retrieve data from all the four entities using CRM SDK. Can anyone please help. 

Please suggest me what would be best approach to retrieve data.

Thanks,

Vinay

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at
    RE: Retrieving data from multiple entity.

    Hi,

    The easiest way to do it in the SDK is to start with your Event, then Fetch or QueryExpressions to query for Registrations with the event id of your event, same thing for schedule, and for the N:N you'll need to query for speakers, and add a link to the relationship name and put a filter on that for the event id.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • Bruno Maciel Servulo Profile Picture
    125 on at
    RE: Retrieving data from multiple entity.

    I understand you're not using the Linq method with the context because that would automatically do the loading of child entities. What you're looking for is called Linked Entity.

    Here is the SDK sample, but you can find many blogs with examples.

    msdn.microsoft.com/.../gg328149.aspx

    What is usually a best approach is identify what are your needs, and maybe caching the events and speaker data is going to be easier.

    In terms of performance vs usability, I prefer using QueryExpression, but I would think about caching the most needed entities and just retrieving individual sets of data using linked entity when needed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans