UndoCheckOut method

Lists.UndoCheckOut method

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

Namespace:  WebSvcLists
Assembly:  STSSOAP (in STSSOAP.dll)

[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
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.

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);
Show:
© 2016 Microsoft