What is the best trigger to execute this code?

The Orders form is required to initialize differently for different users. A database procedure (GET _ROLE_NAME) is used to determine which database roles are enabled for the user logging on to the form If the user has the STORE_CLERK role enabled, certain buttons are disabled and the focus is sent to the Custome_Id text item. If the user has the ADMIN_MGR role enabled, all buttons are available and the focus is sent to the Date Ordered text item. You have written a procedure (SET_BUTTONS) to set the appropriate button properties.
The functionality is achieved with this code:
IF get role name (USER)= ‘STORE_CLERK’ THEN
set_buttons(‘STORE_CLERK’);
GO_ITEM(‘ORDERS.Customer_id’);
ELSE
set_buttons(‘ADMIN_MGR’);
GO_ITEM(‘ORDERS.Date_Ordered’);
END IF;
What is the best trigger to execute this code?

The Orders form is required to initialize differently for different users. A database procedure (GET _ROLE_NAME) is used to determine which database roles are enabled for the user logging on to the form If the user has the STORE_CLERK role enabled, certain buttons are disabled and the focus is sent to the Custome_Id text item. If the user has the ADMIN_MGR role enabled, all buttons are available and the focus is sent to the Date Ordered text item. You have written a procedure (SET_BUTTONS) to set the appropriate button properties.
The functionality is achieved with this code:

IF get role name (USER)= ‘STORE_CLERK’ THEN
set_buttons(‘STORE_CLERK’);
GO_ITEM(‘ORDERS.Customer_id’);
ELSE
set_buttons(‘ADMIN_MGR’);
GO_ITEM(‘ORDERS.Date_Ordered’);
END IF;

What is the best trigger to execute this code?

A.
Pre-Form at form level

B.
When-Validate-ltem at form level

C.
When-New-Form-instance at form level

D.
When-Button-Pressed on any of the enabled buttons

E.
Pre-Block on the first navigable block in the form

F.
When-New-ltem-Instance on the Date Ordered text item



Leave a Reply 0

Your email address will not be published. Required fields are marked *