Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Retrieve all records of a view in an entity Dynamics365

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

  • Michel van den Brink Profile Picture
    Michel van den Brink 4,697 on at
    RE: Retrieve all records of a view in an entity Dynamics365

    Any time! Here to help :-)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieve all records of a view in an entity Dynamics365

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

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieve all records of a view in an entity Dynamics365

    Hello,

    I will also go with Michel van den Brink answer.

    Hope it will work for you!

  • Verified answer
    Michel van den Brink Profile Picture
    Michel van den Brink 4,697 on at
    RE: Retrieve all records of a view in an entity Dynamics365

    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 :-)

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

News and Announcements

Announcing Category Subscriptions!

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans