ReturnStatus Property (VersionUpgradeEvent Object)

Microsoft Office InfoPath

Sets or retrieves a Boolean value indicating the return status of the OnVersionUpgrade event.

expression.ReturnStatus

expression    Required. Returns a reference to the VersionUpgradeEvent object.

Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Remarks

If the ReturnStatus property is set to False, the OnVersionUpgrade event fails and the form is not opened. If set to True, the OnVersionUpgrade event is successful.

Example

In the following example, the ReturnStatus property of the VersionUpgradeEvent object is used to indicate that the OnVersionUpgrade event was not successful:

function XDocument::OnVersionUpgrade(eventObj)
{
   // Cancel the event.
   eventObj.ReturnStatus = false;
}