1
ClientContext cl = new Microsoft.SharePoint.Client.ClientContext("http://" + "mysharepoint" + "/" + SubWeb);
System.Net.NetworkCredential cred = new System.Net.NetworkCredential("myuser", "mypass", "ntuni");

cl.Credentials = cred;

ListItemCollection result;
List qrtList = cl.Web.Lists.GetByTitle(QRT_LIST_NAME);
result = qrtList.GetItems(CamlQuery.CreateAllItemsQuery());
cl.Load(result);
cl.ExecuteQuery();

foreach (ListItem item in result)
{
    if (item.FieldValues["UniqueId"].ToString() == QrtId)
    {

        item.FieldValues["R_x00e9_ponse"] = r.ResponseTxt;
        item.Update();
        qrtList.Update();        
    }
}

cl.ExecuteQuery();

一旦我出于某种原因访问共享点,我的对象就不会更新。这围绕着一个尝试捕获,没有任何东西被捕获。哈尔普?谢谢 !

ps:添加新项目工作正常。

4

1 回答 1

0

如果您使用您的应用程序添加项目,然后在 sharepoint 中修改它们...您需要重新加载您的列表项/列表,因为您的列表版本已过时

...您的问题需要澄清:

1.需要更新的内容

2.你在做什么才能做到这一点

于 2014-03-06T20:12:43.687 回答