Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
UndoCheckOut Method

Lists.UndoCheckOut Method

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

Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx

[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



A string that contains the full path to the document.

Return Value

true if the operation succeeded; otherwise, false.

The following example undoes the check out of a file from Shared Documents in a subsite.

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

Community Additions

© 2015 Microsoft