Hi,
I am trying to delete a form from SharePoint InfoPath Library by calling web service "UpdateListItem" method but the form isn't getting deleted, whereas on the same command I tried to Update and it is successful.
Here is my code for calling web service method.
StringBuilder sb = new StringBuilder();
sb.Append("Method ID='1' Cmd='Delete'");
sb.Append(String.Format("Field Name=\ID\" + id_value + "/Field"));
sb.Append(String.Format("Field Name=\"FileRef\" + URL +"/Field"));
sb.Append("/Method");
System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");
elBatch.SetAttribute("OnError", "Continue");
elBatch.SetAttribute("PreCalc", "TRUE");
elBatch.SetAttribute("ListVersion", "1");
elBatch.SetAttribute("ViewName", "view_id without '{}' braces");
elBatch.InnerXml = sb.ToString();
XmlNode ndReturn = client.UpdateListItems(ListID, elBatch);
Certain tags are not shown in command please get the actual code in attachment.
Any help will be greatly appreciated.
Thanks,
SK.
Suthar