Share via


DocActionEvent.ReturnStatus Property

InfoPath Developer Reference

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

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.ReturnStatus

expression   An expression that returns a DocActionEvent object.

Return Value
Boolean

Remarks

If the ReturnStatus property is set to False, the OnClick event fails. If set to True, the OnClick event is successful. The default value is True.

Bb250853.vs_note(en-us,office.12).gif  Note
Setting the ReturnStatus property to False will cause a message box to be displayed which indicates what has failed.

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 DocActionEvent object is used to indicate that the OnClick event was not successful:

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

See Also