It Doesn't work on SharePoint 2010

Feb 23, 2011 at 3:49 PM



I just tried to use it in content web part on SharePoint 2010 but it doesn't work.

Schould I change something in code or it doesn't work at all on SharePoint 2010?


Jan 22, 2013 at 3:15 PM

In SP 2010 you shouldn't need to use the web services to get the time last modified of a list. You could instead use the SP Client Object Model, located here: 


You could just wait for the oList.get_modified value to equal the current date and time. (maybe a memory-savvy loop or something) and then call whatever method or function that invokes your web part to refresh. I'd say the simplest way would be to $('#ManualRefresh').click();

Then, I would suggest changing the webservice call to get the current page's web parts to an OM call:  the 'collWebPart' object they make there would have all the juicy details you need to manipulate the web parts in any given page.  Since LiveListData already has the looping logic built-out all you would have to do is now use the data stored in collListItem to replace the data they used to grab from the web service.

Now that I said all that, I realize that, either way, the web service-based solution should STILL work in SP 2010. Perhaps you are missing something simple, like a <script> reference to the latest jQuery CDN:

Either way, I feel that the JSOM that comes in 2010 is a much easier option than working with the web services, library or scratch.