There is a requirement to change the default functionality of certain function keys (suck as [Exit], [Create Record], [Duplicate Record], and so on) when the focus is in the INVENTORIES block of the Orders form. If the user presses the [Exit] key, the focus should be transferred to the ORDER_ITEMS block. Pressing the other function keys should cause a meaningful message to appear.
How can you meet this requirement?
A.
Use of Key triggers at the form level only is sufficient, but the Exception Hierarchy property of the trigger must be set to Override.
Form example, the Key-Exit trigger has the following code:
GO_BLOCK(‘order_item’);
B.
Use a Key triggers written on the INVENTORIES block only is sufficient.
For example, the Key-Exit trigger has the following code:
GO_BLOCK(‘order_item’);
C.
Use a combination of block- and form-level Key triggers.
For example, the Key-Exit trigger on the INVENTORIES block has the following code:
GO_BLOCK(‘order_item’);
The form-level Key-Others trigger has the following code:
EXIT_FORM;
D.
Use a Key-Others trigger written at the form level with the Execution Hierarchy property of the trigger set to Before.
The code can be written generically to test for the current block and to use the DO_KEY built-in to exit the form.
For example, it has the following code:
IF :SYSTEM.trigger_block = ‘INVENTORIES’ THEN
GO_BLOCK(‘order_item’);
ELSE
DO_KEY(‘EXIT_FORM’);
END IF