Custom action event (Events)
Event action – Abstract
In the 'Custom action event' category, the events defined via the 'Custom action event' dynamic enumeration are available for selection.
In the 'Custom action event' category, the Triggering events defined via the Custom action event dynamic enumeration are available for selection.
These events can be triggered from different contexts:
per Event action in an Event handling or a Client workflow: Trigger a custom action event (action) (Aktion)
per Behaviour in a Form: Dispatch custom action event (Form designer)
per Ribbon macro command in Menus: Available commands
per DISPATCH_EVENT Action in an Import profile: Import
Which data context applies to a Custom action event?
A Custom action event event is always triggered with a specific data context.
The data context results at runtime from the specific call context, the content of which can depend on configuration settings for the call.
For each calling context, any existing Storage object is transferred to the data context of the event as a clone. This means that the variables and values contained are available in the execution context of event handling that is triggered by the event.
The following cases must be distinguished regarding the input value (or the reference object) in the data context for the event:
'Data object' in the calling context |
Examples |
Calling context: Server |
Calling context: Client |
Entity |
Company account (see Company accounts), Address (see Addresses), Custom entity type, etc. |
The entity is the reference object for event handling and appears as an input value for the event (e.g. in the Event recorder). |
|
complex data object, |
Client object, List value, Date/Time, date range. Number with unit, etc. |
Like an entity, the transferred value is a reference object for event handling and appears (e.g. in the Event recorder) as an input value for the event. |
The value passed is the value of the formData variable in the Storage object for the triggered event The input value, on the other hand, does not contain a value. The event therefore does not specify a reference object for event handling to be executed. |
simple value |
Text value (String), integer (Long), etc. |
*) ►NOTE◄ If a Custom action event is triggered via the ribbon macro command 'Dispatch custom action event' (see Available commands), this is done in the context of a view that specifies at least one specific entity type (as a 'type hint' in the entityClass variable). The transfer of the view type (data input form, overview or combined view) and configurable settings for the ribbon macro command determine how and, above all, with which data context events are triggered:
In the context of an input form, the (volatile) data of the entity displayed in the form always applies – if available – as the input value/reference object for a triggered Custom action event.
In the context of an overview or a combined view, a distinction must be made between several cases:
If there is a single selection, the selected entity is used as the input value/reference object for a triggered Custom action event.
If there is a multiple selection, the 'Dispatch one single event' option in the configuration for the ribbon macro command ('Dispatch one single event', see Available commands) is decisive:
If the 'Dispatch one single event' option is unchecked (default), a Custom action event may be triggered multiple times. In each case, an entity from the selection is used as the input value/reference object.
If the 'Dispatch one single event' option is checked, a Custom action event is triggered exactly once and the following case distinction applies::
If there is a single selection, the selected entity is the input value/reference object. In addition, the 'ID' (id) of this entity appears as the only entry in a list variable entityIds of type Long[].