UpdateListItems 在尝试更新共享点中的列表时出错
我正在尝试使用共享点列表 Web 服务更新列表。但我收到以下错误
Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Result ID="1,Update">
<ErrorCode>0x8102000a</ErrorCode>
<ErrorText>Invalid URL Parameter. The URL provided contains an invalid Command or Value. Please check the URL again.</ErrorText>
</Result>
</Results>
这是我的代码片段
string strViewID = "{46FCE9EB-C789-430F-B1A3-9ACA41FE9BD9}";
XmlDocument camlDocument = new XmlDocument();
XmlNode queryNode = camlDocument.CreateElement("Query");
XmlDocument myListDoc = new XmlDocument();
XmlElement batchXML = myListDoc.CreateElement("Batch");
batchXML.SetAttribute("OnError", "Continue");
batchXML.SetAttribute("ListVersion", "1");
batchXML.SetAttribute("ViewName", strViewID);
batchXML.InnerXml = "<Method ID ='1' Cmd='Update'>" + "<Field Name='Title'>Z</Field>" +"<Field Name='Region'>West</Field>"+
"<Field Name='Size'>Z</Field>" + "<Field Name='Sales'>Z</Field></Method>";
XElement sys = XmlElementToXelement(batchXML);
XElement myListReturn = ws.UpdateListItems("{A30AFD47-7118-4904-A3B9-BCEFF7E3E203}", sys);
请帮忙。
I am trying to update a list using sharepoint list web services. But I am getting the following error
Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Result ID="1,Update">
<ErrorCode>0x8102000a</ErrorCode>
<ErrorText>Invalid URL Parameter. The URL provided contains an invalid Command or Value. Please check the URL again.</ErrorText>
</Result>
</Results>
Here is my code snippet
string strViewID = "{46FCE9EB-C789-430F-B1A3-9ACA41FE9BD9}";
XmlDocument camlDocument = new XmlDocument();
XmlNode queryNode = camlDocument.CreateElement("Query");
XmlDocument myListDoc = new XmlDocument();
XmlElement batchXML = myListDoc.CreateElement("Batch");
batchXML.SetAttribute("OnError", "Continue");
batchXML.SetAttribute("ListVersion", "1");
batchXML.SetAttribute("ViewName", strViewID);
batchXML.InnerXml = "<Method ID ='1' Cmd='Update'>" + "<Field Name='Title'>Z</Field>" +"<Field Name='Region'>West</Field>"+
"<Field Name='Size'>Z</Field>" + "<Field Name='Sales'>Z</Field></Method>";
XElement sys = XmlElementToXelement(batchXML);
XElement myListReturn = ws.UpdateListItems("{A30AFD47-7118-4904-A3B9-BCEFF7E3E203}", sys);
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要尝试将 ID 列与更新中的其他列一起添加,然后重试 -
<字段名称='ID'>您要更新的字段 ID
You may want to try adding the ID Column along with your other columns in Update and try again -
< Field Name='ID' > ID of field you intend to update