Answered by:
Dynamics 2013 odata response is missing the next set link

Question
-
I am implementing a MS CRM 2013 application using Angular. My data context uses the Dynamics odata API (/XRMServices/2011/OrganizationData.svc/) plus some other sources.
As you know the default odata setting for Dynamics is to return max 50 records per request.
According to this page on MSDN the request response object should contain a
_next
property which contains a<link rel="next" href="<url to next set of records>"
I can see this link on an example link: http://services.odata.org/Northwind/Northwind.svc/Orders
But the response I get from my instance of Dynamics 2013 even though there are 500 records I only get 50 but no next link. You can view the response xml here
The request I make looks like this:
$http.get(clientUrl() + "ListSet?$select=listaccount_association,listcontact_association/EMailAddress1,listcontact_association/FirstName,listcontact_association/JobTitle,listcontact_association/LastName&$expand=listaccount_association,listcontact_association&$filter=ListId " + filterString).then(...
Am I missing some settings to enable this? Do I need to pass anything more into the constructed url to get this link?
Any help is appreciated.
Below is my returned data object which has no _next available.
- Edited by Concep MSDN account Wednesday, October 15, 2014 11:14 AM
Tuesday, October 14, 2014 2:58 PM
Answers
-
Are you looking at the "_next" object?
http://msdn.microsoft.com/en-us/library/gg985387.aspx
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn- Proposed as answer by JLattimerMVP, Moderator Tuesday, October 14, 2014 6:09 PM
- Marked as answer by Concep MSDN account Thursday, October 16, 2014 2:34 PM
Tuesday, October 14, 2014 6:09 PMModerator
All replies
-
Are you looking at the "_next" object?
http://msdn.microsoft.com/en-us/library/gg985387.aspx
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn- Proposed as answer by JLattimerMVP, Moderator Tuesday, October 14, 2014 6:09 PM
- Marked as answer by Concep MSDN account Thursday, October 16, 2014 2:34 PM
Tuesday, October 14, 2014 6:09 PMModerator -
Hi Jason,
Thank you for your reply. The $select was reducing my returned set in such a way that even the __next was being stripped out. After correcting that now I do get the _next link.But now when I try to retrieve the result from the next link I get the following:
{ "error" : { "code" : "-2147220989", "message" : { "lang" : "en-GB", "value" : "Query in RelationshipQuery must be for related entity." } } }
- Edited by Concep MSDN account Thursday, October 16, 2014 2:34 PM
Wednesday, October 15, 2014 10:30 AM