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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans