Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to get name reference entities and fieldname of relationship entity in MS Dynamics CRM?

Posted on by Microsoft Employee

Hi,

I want to get relationship schema, reference entities name, fieldname using api call. I have tried with API call of "RelationshipDefinitions" but I don't get fieldname of reference entity. Please review following screenshot.

How to get related records from ShcemaName ?

Please suggest.

8231.Entity.png

*This post is locked for comments

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How to get name reference entities and fieldname of relationship entity in MS Dynamics CRM?

    See the below webapi call:

    domain.crm.dynamics.com/.../Microsoft.Dynamics.CRM.OneToManyRelationshipMetadata$filter=ReferencedEntity%20eq%20%27account%27

    In there you have all the relationship information:

    ReferencedAttribute

    ReferencedEntity

    ReferencingAttribute

    ReferencingEntity

    Add the information you need to the select portion of the above call.

    Hope this helps.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How to get name reference entities and fieldname of relationship entity in MS Dynamics CRM?

    Hi Chhaya,

    You need to query the EntityDefinition-

    testorg.api.crm6.dynamics.com/.../EntityDefinitions(LogicalName='account')

    Refer this MSDN for reference: msdn.microsoft.com/.../mt607522.aspx

    Hope this help.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans