1Z0-151 · Question #64
Customers log in to your Orders application by using their customer ID, which is saved as a global variable. When the Orders form first comes up, you want it to be populated with the customer's…
The correct answer is B. Change the last line of the When-Button-Pressed code to. Note: EXECUTE_QUERY procedure Clears the current block, opens a query, and fetches anumber of selected records. If there are changes tocommit, Forms Builder prompts the operator to committhem before continuing EXECUTE-QUERYprocessing
Question
Customers log in to your Orders application by using their customer ID, which is saved as a global variable. When the Orders form first comes up, you want it to be populated with the customer's orders, and you do not want customers to be able to query for another customer's orders. You code the following triggers:
When-New Form instance on the Orders form:
GO_BLOCK('orders'); EXECUTE_QUERY; You also have a button in the Control block labeled Query Orders with a When-Button Pressed trigger that has the same code as the When New-Form instance trigger. To test the form, you run it and log in a Customer 104. When you click Query Orders, all orders are shown, not just those for Customer 104. What is the best way to correct this issue to ensure that the customer can never query another customer's orders?
Options
- ADelete the Key-Exeqry trigger and add the its first line after the call to GO_BLOCK in the When-
- BChange the last line of the When-Button-Pressed code to:
- CDelete the Key-Exqry trigger and put its code in an On-Select trigger.
- DDelete the Key-Exqry trigger and put its code in a Pre-Query trigger.
How the community answered
(54 responses)- A9% (5)
- B81% (44)
- C6% (3)
- D4% (2)
Explanation
Note: EXECUTE_QUERY procedure Clears the current block, opens a query, and fetches anumber of selected records. If there are changes tocommit, Forms Builder prompts the operator to committhem before continuing EXECUTE-QUERYprocessing
Topics
Community Discussion
No community discussion yet for this question.