Я пытаюсь создать новый элемент в списке sharepoint.Не появляется никаких сообщений об ошибках, но элемент не отображается в списке.
Вот мой код:
'Declare and initialize Lists Web service.
Dim listService As New Lists()
'Authenticate
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
'Set the Url property of the service for the path to a subsite.
listService.Url = "http://site/subsite/_vti_bin/lists.asmx"
'Get Name attribute values (GUIDs) for list and view.
Dim ndListView As System.Xml.XmlNode = listService.GetListAndView(listguid, "")
Dim strListID As String = ndListView.ChildNodes(0).Attributes("Name").Value
Dim strViewID As String = ndListView.ChildNodes(1).Attributes("Name").Value
'Create an XmlDocument object and construct a Batch element and its
'attributes. Empty string as view means use the default view.
Dim doc As New System.Xml.XmlDocument()
Dim batchElement As System.Xml.XmlElement = doc.CreateElement("Batch")
batchElement.SetAttribute("OnError", "Continue")
batchElement.SetAttribute("ListVersion", "1")
batchElement.SetAttribute("ViewName", strViewID)
'Specify methods for the batch post using CAML.
'Command id 1 = new
batchElement.InnerXml = "<Method ID='1' Cmd='New'>" +
"<Field Name='Title'>test</Field>" +
"<Field Name='AssignedTo'>Phil</Field>" +
"<Field Name='Status'>Active</Field>" +
"<Field Name='Priority'>Low</Field>" +
"<Field Name='Comment'>test</Field>" +
"<Field Name='Category'>test</Field>" +
"<Field Name='DueDate'>9/27/2011 12:00 AM</Field>" +
"<Field Name='RelatedIssues'></Field>" +
"<Field Name='V3Comments'>test</Field>" +
"<Field Name='NameAndSurname'>test test</Field>" +
"<Field Name='StudentNo'>209203003</Field>" +
"<Field Name='Account'>accounts</Field>" +
"<Field Name='Author'>Phil</Field>" +
"<Field Name='Complaints'>Complaints</Field>" +
"<Field Name='Edited'>Phil</Field></Method>"
Try
listService.UpdateListItems(strListID, batchElement)
LabelStatus.Text = "Call Escalated to sharepoint, ok."
Catch ex As Exception
LabelStatus.Text = ex.ToString
End Try
Может кто-нибудь указать, где я иду не так
Приветствия, Фил.