OnQueryClosePage Trigger

Runs as a page closes and before the OnClosePage Trigger executes.

Syntax

trigger OnQueryClosePage(CloseAction): Ok 
begin
    ...
end;

Parameters

CloseAction

(Action) The CloseAction chosen by the user; usually OK or Cancel.

Return Value

Ok
Type: Boolean

True to close the page; otherwise false. This value is checked after each call.

Applies To

  • Pages

Important

The trigger is only invoked when the page is hosted in a modal popup window (MPO).

Remarks

If the page that is closing and all its child pages return true in the OnQueryClosePage trigger, then the OnClosePage Trigger is called for all child pages and then for the parent page.

If an error occurs in the OnQueryClosePage trigger or it returns false, then the page is not closed.

When the OnQueryClosePage trigger is called on a subpage, the CloseAction parameter is set to the same value as the parent page.

You can use this trigger to write to the database.

See Also

OnClosePage Trigger
Page and Action Triggers
Page Properties
Triggers