I want to fetch ID and Title of last created item from SharePoint list using REST. I am using below url but it gives me wrong item, there are more than 10k items in the list.
http://servmachine.contoso.com/_vti_bin/ListData.svc/Products?OrderBy=ID%20DSC&$top=1
Products()it can be ordered by any field. – Amal Hashim Nov 21 '14 at 16:10IDinstead ofId. @james-grizzle why would Created be better than ID, wouldn't it be the same? And Modified would not be the last created item. – eirikb Nov 21 '14 at 20:48orderbydoesn't work iftopis not used. See here: http://sharepoint.stackexchange.com/questions/58188/i-cannot-get-orderby-to-work-in-sps-2010-listdata-svc-rest-query – Nadeem Yousuf-AIS Nov 24 '14 at 06:53$orderBycombined with$topalso worked. – eirikb Nov 24 '14 at 06:57$orderByworks when used with$top. However, if$orderByis used alone it doesn't work – Nadeem Yousuf-AIS Nov 24 '14 at 07:01