nerdexam
Oracle

1Z0-151 · Question #82

The Orders form is sometimes run automatically and sometimes run from the Customers form, when it is run from the Customers form, any queries should be restricted to the customer that is currently…

The correct answer is D. You do not need to change anything; the code compiles and functions correctly in the menu item. See the full explanation below for the reasoning.

Question

The Orders form is sometimes run automatically and sometimes run from the Customers form, when it is run from the Customers form, any queries should be restricted to the customer that is currently selected. The Customers form button that runs the Orders form sets a global variable to the current customer ID. The Orders form has a button labeled Execute Query with the following When-Button Pressed trigger:

DEFAULT_VALUE (NULL, 'GLOBAL.Customer_id'); IF: GLOBAL.customer_id IS NOT NULL THEN SET_BLOCK_PROPERTY ('orders', DEFAULT_WHERE, 'orders.customer_id = ' | | :GLOBAL.CUSTOMER_id); END IF; EXECUTE_QUERY You want to duplicate that functionality in a menu item for the Summit menu that is attached To the Orders form. What changes must you make to the code so that the menu code functions as it does in the form?

Options

  • AChange both occurrence of :GLOBAL.customer_id to 'GLOBAL.customer_id'.
  • BChange 'GLOBAL.customer_id' in line 1 to :GLOBAL.customer_id.
  • CChange both occurrence of :GLOBAL.customer_id to NAME_IN ('GLOBAL.customer_id').
  • DYou do not need to change anything; the code compiles and functions correctly in the menu item.
  • EYou cannot add this type of code in the menu because it refers to the items on the form that cannot be

How the community answered

(23 responses)
  • B
    4% (1)
  • C
    4% (1)
  • D
    83% (19)
  • E
    9% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-151 Practice