nerdexam
Oracle

1Z0-141 · Question #118

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…

The correct answer is C. When-New-Form-Instance at form level. See the full explanation below for the reasoning.

Question

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 Customer_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?

Options

  • APre-Form at form level
  • BWhen-Validate-Item at form level
  • CWhen-New-Form-Instance at form level
  • DWhen-Button-Pressed on any of the enabled buttons
  • EPre-Block on the first navigable block in the form
  • FWhen-New-Item-Instance on the Date_Ordered text item

How the community answered

(61 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    82% (50)
  • E
    10% (6)
  • F
    5% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-141 Practice