VersionUpgradeEvent.ReturnStatus Property

InfoPath Developer Reference

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

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.ReturnStatus

expression   An expression that returns a VersionUpgradeEvent object.

Return Value
Boolean

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.

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.

Example

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

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

See Also