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)

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


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudio.DocumentDocumentId
The document to remove entries for.
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.
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.

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