【发布时间】:2009-08-18 00:42:47
【问题描述】:
我正在使用 sharepoint,并且正在尝试将服务调用添加到 Microsoft 的呼叫中心应用程序模板。我可以使用以下代码添加一个名称:
SPSite allSites = new SPSite(siteURL);
SPWeb site = allSites.AllWebs[siteName];
SPListItemCollection requestsList = site.Lists[serviceRequests].Items;
SPListItemCollection customerList = site.Lists[customers].Items;
SPListItem item = requestsList.Add();
item["Service Request"] = "Program Test";
//item["Customer"] = "Donald Duck";
item["Customer"] = customerList[0];
item.Update();
首先我尝试只使用客户名称,但没有成功。然后我得到了客户列表并尝试使用客户列表项,但我仍然得到同样的错误:
"Invalid data has been used to update the list item. The field you are trying to update may be read only."
有没有人有从类似的代码向共享点添加信息的经验?有没有办法确定哪些字段是只读的(如果有的话)?
谢谢!
【问题讨论】:
标签: c# sharepoint