Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 14 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Good day, I need help. I'm trying to Update a Sharepoint list using VBSCRIPT via Web Services. I got this example from the Net but errors: Class not defined 'sitesWebServiceLists.Lists()'
Dim listService
Set listService = New sitesWebServiceLists.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
listService.Url = "<a href="http://sql2005-oss2007/Lists/Change%20Control/_vti_bin/Lists.asmx" target="_blank">http://sql2005-oss2007/Lists/Change%20Control/_vti_bin/Lists.asmx</A>"
Dim ndListView
Set ndListView = System.Xml.XmlNode = listService.GetListAndView("MyList", "")
Dim strListID
Set strListID = ndListView.ChildNodes(0).Attributes("Name").Value
Dim strViewID
Set strViewID = ndListView.ChildNodes(1).Attributes("Name").Value
Dim doc
Set doc = New System.Xml.XmlDocument()
Dim batchElement
Set batchElement = System.Xml.XmlElement = doc.CreateElement("Batch")
batchElement.SetAttribute "OnError", "Continue"
batchElement.SetAttribute "ListVersion", "1"
batchElement.SetAttribute "ViewName", strViewID
batchElement.InnerXml = "<Method ID='1' Cmd='Update'><Field Name='Status'>6</Field></Method>"
listService.UpdateListItems strListID, batchElement
I see you have posted your request all over the web. If you had goiogles your request you would have immediately found that it cannot readily be done inscript.
I di d some testing. The methods - any - will not work on SPS on SBS 2003 or later due to redirects. You will need to alter web.config to make this work and I don't recommend it if you are not well versed in manageing SPS.
This topic is 14 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.