CheckOutFile

Function

$().SPServices

Web Service

Lists

Operation

CheckOutFile

Example

Here is an example of using CheckOutFile from jonesnick770. This link from a DVWP calls the function to check out the document:

<a href="javascript:CheckOutBook('http://muskit9238/{@FileDirRef}/{@FileLeafRef}', '{@Modified}');"><b>Request Book</b></a>

Below is the javascript/jQuery:

function CheckOutBook(bookURL, lastDate) {
    $().SPServices({
        operation: "CheckOutFile",
        pageUrl: bookURL,
        checkoutToLocal: "false"
    });
    location.reload(true);
}

Back to top