VersionHistoryRemoveEntries Method (ConnectionId, SessionId, DocumentId, DateTime, VersionHistoryRemoveOptions) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Removes any version from the history that is older than a certain date. If no date is supplied all versions are removed except for the last approved one and the editable content (if any)

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public int RemoveEntries(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	DateTime limitDate,
	VersionHistoryRemoveOptions options
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
documentId
Type: ContentStudio.DocumentDocumentId
The document to remove entries for.
limitDate
Type: SystemDateTime
Indicates a date. All version older than this data will be removed. Pass DateTime.MinValue to remove all entries found. If Options is set to AllWithReset this parameter is ignored.
options
Type: ContentStudio.DocumentVersionHistoryRemoveOptions
Indicates how the removal operation should be performed. For more info see the VersionHistoryRemoveOptions enumeration.

Return Value

Type: Int32
The number of entries actually removed.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

Admin permission on the document is required in order to be able to remove version history entries.
See Also

Reference