List of questions
Related questions
Question 259 - Certified Platform Developer II discussion
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?
A.
Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
B.
Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
C.
Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
D.
Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
Your answer:
0 comments
Sorted by
Leave a comment first