Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The proc_DeleteDocumentVersion stored procedure is invoked to delete a document version and optionally place it in the recycle bin. A current version (whether published or draft) cannot be deleted. A current version is either the current published version or the current draft version of the document.
-
PROCEDURE proc_DeleteDocumentVersion( @DocSiteId uniqueidentifier, @DocDirName nvarchar(256), @DocLeafName nvarchar(128), @DocVersion int, @UserId int, @AppPrincipalId int, @DeleteOp int @RequestGuid uniqueidentifier = NULL OUTPUT );
@DocSiteId: The site collection identifier (section 2.2.1.1.9) of the site collection containing the document whose specified version is being deleted.
@DocDirName: The directory name of the document to delete. If there is no forward slash in the directory name, then the value MUST be an empty string.
@DocLeafName: The leaf name of the document to delete.
@DocVersion: The version of the document to delete. This value MUST NOT be a current version.
@UserId: The User Identifier (section 2.2.1.1.13) of the current user requesting the deletion. This value MUST refer to an existing user identifier for the specified site collection.
@AppPrincipalId: The app principal identifier of the app requesting the deletion. If the request is not made by an app then it MUST be set to 0.
@DeleteOp: A value determining delete options. The value MUST be listed in the following table.
|
Value |
Description |
|---|---|
|
3 |
The deleted document version MUST NOT be placed in the recycle bin (non-recoverable delete). |
|
4 |
The deleted document version MUST be placed in the recycle bin (recoverable delete). |
@RequestGuid: The optional request identifier for the current request.
Return Values: The proc_DeleteDocumentVersion stored procedure returns an integer return code that MUST be in the following table.
|
Value |
Description |
|---|---|
|
0 |
Successful execution. |
|
2 |
The document version specified by @DocSiteId, @DocDirName, @DocLeafName and @DocVersion cannot be found. |
|
186 |
Invalid Parameter: An invalid version was specified. The value specified in @DocVersion is a current version. |
The proc_DeleteDocumentVersion stored procedure MUST NOT return any result sets.