CheckInDocument
Checks in a document, unlocking it for other users to modify. Ensures document updates are properly tracked.
Stored Procedure-Specific Information
The CheckInDocument stored procedure checks in a document to a SharePoint document library after it has been checked out. You can optionally upload a new version of the file and add a comment describing the changes.To check in a document with updated content and a comment, enter:
EXEC CheckInDocument File = 'C:\path\to\UpdatedDocument.txt', Library = 'Documents', Comment = 'Updated content', RemoteFile = 'Test Folder 1/Document.txt';
To check in a document without uploading new content, enter:
EXEC CheckInDocument Library = 'Documents', Comment = 'No changes made', RemoteFile = 'Test Folder 1/Document.txt';
Input
| Name | Type | Required | Description |
| File | String | False | The local path of the file that will overwrite the existing document in SharePoint upon check-in. Example: 'C:/myfolder/myfile.txt'. |
| Library | String | True | The name of the document library on the SharePoint site where the file resides. Example: 'Shared Documents'. |
| Comment | String | False | An optional comment describing the changes made before checking the document in. |
| RemoteFile | String | True | The relative or full URL of the file in the SharePoint document library. If only the file name is provided, the latest version will be checked in. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the document check-in operation was successful. Returns 'true' for success and 'false' for failure. |