Skip to main content

Notifications

Announcements

No record found.

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 Microsoft Employee

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

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 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

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 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

    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
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: 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

    Convert the entire query to fetch xml.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 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

    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
    Nithya Gopinath 17,074 on at
    RE: 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

    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.

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans