Click or drag to resize
VersionManager.EnsureVersion Method
Ensures that the document version history is present for the given document, returns the document version.

Namespace: CMS.DocumentEngine
Assembly: CMS.DocumentEngine (in CMS.DocumentEngine.dll) Version: 8.2.23
Syntax
C#
public int EnsureVersion(
	TreeNode node,
	bool nodeIsPublished,
	bool nodeDeletion = false,
	WorkflowInfo forceWorkflow = null
)

Parameters

node
Type: CMS.DocumentEngine.TreeNode
Document node
nodeIsPublished
Type: System.Boolean
Document is published
nodeDeletion (Optional)
Type: System.Boolean
Indicates if the version should be ensured for the recycle bin
forceWorkflow (Optional)
Type: CMS.WorkflowEngine.WorkflowInfo
Workflow instance to force to apply

Return Value

Type: Int32
Remarks
The document is updated to the database, there is no need to update it after
See Also