CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 110: Certified Platform Developer II

The test method above tests in 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?

Nội dung câu hỏi

The test method above tests in 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?

Minh họa câu hỏi

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced
  2. B. Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code
  3. C. Add Test.startTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code — đáp án hiện tại
  4. D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề