Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How do I get an account's related accounts with Web API?

Posted on by 15

Say I've got a few accounts, let's call the first "HQ", then I add a few account relationships. How do I then select the account "HQ", and expand the related accounts?

The query would look something like this:

accounts(HQ Account Id)?$select=name&$expand=account_accounts($select=name)

It's the "account_accounts" bit I can't find out the correct relationship name.

Is there somewhere to find out all the available relationships and the names that can be used for the queries?

Found it! It's account_parent_account

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: How do I get an account's related accounts with Web API?

    Hi,

    Try this-

    testorg.crm.dynamics.com/.../accounts

    Hope this helps.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans