none
SharePoint Online CSOM GetChanges RRS feed

  • Question

  • Hi,

    I can't seem to find answer to simple question,so could anyone please help with this:

    In current (v15/16) SharePoint Online, can I use CSOM to get list of changes on list/site using GetChanges API call (http://msdn.microsoft.com/en-us/library/ms461643(v=office.14).aspx). 

    Thanks!

    Tuesday, June 10, 2014 11:32 AM

Answers

  • http://msdn.microsoft.com/en-us/library/office/gg454742%28v=office.14%29.aspx

    http://msdn.microsoft.com/en-us/library/office/ee537247%28v=office.14%29.aspx

    GetChanges  is also available for V15 \ sharepoint online

    http://msdn.microsoft.com/en-us/library/ms461643(v=office.15).aspx

    Try to use below code:

    lientContext context = new ClientContext("http://SPSite"); context.Credentials = new NetworkCredential("user", "pwd", "domain"); ChangeQuery cq = new ChangeQuery(true, true); cq.ChangeTokenStart = new ChangeToken(); cq.ChangeTokenStart.StringValue = "1;3;" + list.Id.ToString() + ";" + DateTime.UtcNow.AddHours(-1).Ticks.ToString() + ";-1"; ChangeCollection col = list.GetChanges(cq); context.Load(col); context.ExecuteQuery(); MessageBox.Show(col.Count.ToString());


    http://webcache.googleusercontent.com/search?q=cache:HfqYOemJ780J:morshemesh.blogspot.com/2010/12/retrieving-items-changedaddeddeleted.html+&cd=8&hl=en&ct=clnk&gl=in&client=firefox-a

    • Marked as answer by Jussi Palo Tuesday, June 10, 2014 1:07 PM
    Tuesday, June 10, 2014 12:34 PM
    Moderator