Form.SetAction

Syntax:

SetAction(<EventName>, <Action>)

Parameters:

<EventName> (required)

Type: String.
Event name for which the new action is defined.

<Action> (required)

Type: Action; Undefined.
Action that will be executed when the specified event is received from the form.
If this value is set to Undefined, no actions will be performed on receiving the specified event from the form.

Description:

Sets a new handler procedure (action) for the specified form event.

Availability:

Thick client.

Note:

Procedure must be exported and is located in the form module; at the same time the number of parameters must be the same as required number of parameters of a event that initiates calling of an action.

Example:

ActionAtClosingForm = New Action("OnFormClose");
SetAction("OnClose", ActionAtClosingForm);

See also:

Form, method GetAction
Action

    

1C:Enterprise Developer's Community