You are here: COM API reference > Events > BeforeRestoreVersion event

BeforeRestoreVersion event

This event occurs when the user selects to restore an old revision of a document.

Syntax

Private Sub AMUIExtension_BeforeRestoreVersion(
         ByVal CurrentObject As Object,
         ByVal Version As Object,
         Abort As Boolean)
Parameters
Name Description

CurrentObject

The document for which the revision will be restored.

Version

A reference to the revision that will be restored (IAMVersionable interface).

Abort

Setting this argument to True will abort the operation. The AfterRestoreVersion event will not occur.

Remarks

The CurrentObject argument is an AMDocument object.

The Version object is a reference to the document revision in history. It is read-only.

When the current revision is a released (or submitted) document, a Quick Change (or Working Copy) will be created to restore the old revision. This will initiate the BeforeCreateWorkingCopy event and the AfterCreateWorkingCopy event. The events will occur in the following order:

  1. BeforeRestoreVersion event
  2. BeforeCreateWorkingCopy event
  3. Quick Change or working copy is created.
  4. AfterCreateWorkingCopy event
  5. The revision is restored.
  6. AfterRestoreVersion event

www.bluecieloecm.com