Hi there
I have a code that pulls data from a list on SharePoint Online site.
The URL was set to /_vti_bin/client.svc/web/Lists.getByTitle('ListName') and this worked and picked up all the values. Until last week when it stopped picking up any further entries made to the list.
I changed the URL on the AJAX code to /_vti_bin/ListData.svc/ListName and this fixed the problem and it started picking up all the list entries.
$.ajax({ //url: "https://SPSITE/_vti_bin/client.svc/web/Lists/getByTitle('ListName')/items?$filter=(Site eq '"+site+"')&$orderby=Date asc", url: "https://SPSITE/_vti_bin/ListData.svc/ListName()?$orderby=Date asc&$filter=(Site eq '"+site+"')", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { $.each(data.d.results, function (index,value){ }) }, error: function (data) { //failure(data); } })
From my research I understand that the ListData.svc is the older one that was for SP 2010 and Client.svc is the newer one for SP 2013.
The change of URL caused all values from a particular currency column to return as undefined. When I change the URL back, the value is returned successfully.
Has anyone else had the same problem? Any ideas on how I could fix it?
- Edited by teaa 16 hours 13 minutes ago missed closing bracket