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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting Account details along with Contacts?

(0) ShareShare
ReportReport
Posted on by

Hello, I'm working on a C# app that access the user's Dynamics data.  In some cases I lookup Contacts and if those contacts have an Account Name (aka Company Name) set then I'd also like to get back the Account name and ID along with some Contact details.  I've got the lookup of the Contacts working fine but haven't been able to figure out if I can also get back the related Account info.  I'm using a QueryExpression to get back the Contacts along with RetrieveMultiple().  I believe that the relationship I'm interested in is the contact_customer_contacts but beyond that I'm clueless.  I tried forming up some kind of LinkEntitys but couldn't seem to get the lookup to work.

This seems like a pretty common needs so how do I do it?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You need to use Link entity (msdn.microsoft.com/.../microsoft.xrm.sdk.query.linkentity.aspx) to get related entity fields, you can use queryexpression or fetchxml for this. below are some of the threads which should help you

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

    community.dynamics.com/.../140622

    msdynamicscrmblog.wordpress.com/.../get-fetch-xml-linked-entity-attributes-using-c-in-dynamics-crm-2011

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans