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)

Retrieve all records of a view in an entity Dynamics365

(0) ShareShare
ReportReport
Posted on by

Hi All, I am new to dynamics api, please help with the following"

I want to retrieve all dynamics records data in json format within a view in an entity. I obtained the viewId from the URL in browser, assume it's viewId-bla-bla

I used "https://[rootblabla]/api/data/v9.0?savedquery=viewId-bla-bla" on a URL in browser, but the  json reponse rendered seems like metdata, i.e, not the records information in that view. 

{

"@odata.context": "https://[root]/api/data/v9.0/$metadata",

"value": [

{"name": "accountleadscollection","kind": "EntitySet","url": "accountleadscollection"},

{"name": "accounts","kind": "EntitySet","url": "accounts"},

{"name": "aciviewmappers","kind": "EntitySet","url": "aciviewmappers"},

......

]

}

What should I use as the retrieve URL, so that I can have the returned response containing the records within that view please?

Thank you very much.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at

    Hello suehh,

    The URL of the API call isn't quite correct. You are missing the entity name and the Q in 'savedQuery' needs to be a capital (crazy detail)

    Try this URL:

    https://organizationname.crm.dynamics.com/api/data/v9.0/accounts?savedQuery=00000000-0000-0000-00AA-000010001002


    Make sure to replace the organization name, entity name and the guid of the view with your own :-)

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    I will also go with Michel van den Brink answer.

    Hope it will work for you!

  • Community Member Profile Picture
    on at

    Thank you Michel. I used https://[root]/api/data/v9.0/[entityname]?savedQuery=[viewId] and it worked.

  • Michel van den Brink Profile Picture
    4,697 on at

    Any time! Here to 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

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