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)

How to get expand fields data in webapi query ... can anyone share in query i have expand = st_account_contact_accountid(select = accountnumber).How to get this relationship accountnumber

(0) ShareShare
ReportReport
Posted on by

How to get expand fields data in webapi query ... can anyone share  in query i have expand = st_account_contact_accountid(select = accountnumber).How to get this relationship accountnumber 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi,

    Try to use the expand as shown below.

    $expand=st_account_contact_accountid($select=accountnumber)

    See the link below for more details.

    https://community.dynamics.com/crm/b/joegilldynamicscrm/archive/2016/03/23/web-api-querying-with-expand

    Hope this helps.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi nithya gopinath,

    i have expand in between query so for comes to expand fileds data we need to convert it to fetchxml or we need to convert entire query into fetchxml?

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Convert the entire query to fetch xml.

  • Community Member Profile Picture
    on at

    Hi!

    I think you should try CRM Restbuilder solution, it will help you to create any query you want.

    Try to use this article:
    github.com/.../releases


    Hope it helps

    Please mark it As Answered or Verified if it did help you.

    Thanks

    Vlad
    http://dynamicalabs.com/

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    Scenario 1:-

    I got solution for expand query. No need to convert into fetchxml. when we use  results[i].[st_account_contact_accountid@odata.nextLink]. we will get results in the form of  query for particular to that expand fields then normally we can go with webapi retrieve and we will get results.

    Scenario 2:-

    results[i].[st_account_contact_accountid][fieldsname] it will return fields data.

    Scenario 3:-

    If want we can convert all the query into fetchxml.

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)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans