Question 56

Exhibit:

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.
The test method fails at the Line 20 because of too many SOQL queries
What is the correct way to fix this?

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?
  • Question 57

    The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored.
    Which options are valid? (Choose two.)
  • Question 58

    Users report that a button on a custom Lightning Web Component is not working. However, there are no other details provided. What should the developer use to ensure error messages are properly displayed?
  • Question 59

    If the "PageReference.setRedirect" Apex function is set to True, what type of request is made?
  • Question 60

    A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of
    "1" for a: Exec_Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account:
    trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountInstance: Trigger.New){ if (Trigger .
    isBefore){ accountInstance Exec_Count_c += 1; } System. debug
    (accountInstance.Exec_Count_c); } }