SP.File.checkOut() Method

Applies to: SharePoint Foundation 2010

Checks out the file from a document library based on the check out type.

SP.File.checkOut();

Parameters

  • checkOutType
    Specifies the type of checkout.
  • lastModifiedDate
    Specifies the date the file was last modified. If it is in a valid date format, the server must not check out the file unless it matches the last modified date. Otherwise, the server must ignore this parameter.

    The syntax for the date is hereby changed to: date = 1*2DIGIT month 2*4DIGIT.

Applies To

SP.File Class

Exceptions

  • [Microsoft.SharePoint.SPFileCheckOutException]
    Checkout arguments are not valid. Error code: -2147023436.
  • [Microsoft.SharePoint.SPFileCheckOutException]
    File is already checked out. Error code: -2130575306.
  • [System.UnauthorizedAccessException]
    The current user has insufficient permissions. Error code: -2147024891.

See Also

Reference

SP.File Methods

SP.File Properties

SP Namespace