Lists.UndoCheckOut Method

Undoes the check-out of a given document in a SharePoint document library.

Namespace:  [Lists Web service]
Web service reference: http://Site/_vti_bin/Lists.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/UndoCheckOut", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function UndoCheckOut ( _
    pageUrl As String _
) As Boolean
'Usage
Dim instance As Lists
Dim pageUrl As String
Dim returnValue As Boolean

returnValue = instance.UndoCheckOut(pageUrl)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/UndoCheckOut", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public bool UndoCheckOut(
    string pageUrl
)

Parameters

  • pageUrl
    Type: System.String

    A string that contains the full path to the document.

Return Value

Type: System.Boolean
true if the operation succeeded; otherwise, false.

Examples

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);

See Also

Reference

Lists Class

Lists Members

Lists Web Service