Lists.UndoCheckOut Method
Undoes the check-out of a given document in a SharePoint document library.
Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx
Syntax
<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut", RequestNamespace:="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace:="http://schemas.microsoft.com/sharepoint/soap/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function UndoCheckOut ( _
pageUrl As String _
) As Boolean
Dim instance As Lists
Dim pageUrl As String
Dim returnValue As Boolean
returnValue = instance.UndoCheckOut(pageUrl)
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)]
public bool UndoCheckOut (
string pageUrl
)
Parameters
- pageUrl
A string that contains the full path to the document.
Return Value
true if the operation succeeded; otherwise, false.
Example
The following example undoes the check out of a file from Shared Documents in a subsite.
Dim listService As New Web_Reference_Folder.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim undoCheckout As String = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt"
Dim undoCheckOut As Boolean = listService.UndoCheckOut(undoCheckout)
Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
string undoCheckout = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt";
bool undoCheckOut = listService.UndoCheckOut(undoCheckout);