New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 8 Question 15 Discussion

Actual exam question for Salesforce's Salesforce Certified Platform Developer II (Plat-Dev-301) exam
Question #: 15
Topic #: 8
[All Salesforce Certified Platform Developer II (Plat-Dev-301) Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

0/2000 characters
Marylou
4 months ago
Option C seems a bit off, why not just focus on the trigger itself?
upvoted 0 times
...
Ashleigh
4 months ago
Wait, can Process Builder really handle all that logic? Sounds risky.
upvoted 0 times
...
Elke
4 months ago
Definitely agree with option D, Process Builder can help a lot!
upvoted 0 times
...
Felicia
4 months ago
I think reducing the number of Accounts created is a better approach.
upvoted 0 times
...
Malcolm
4 months ago
Just add Test.startTest() and Test.stopTest() around the trigger execution.
upvoted 0 times
...
Kirk
5 months ago
I wonder if using Process Builder instead of triggers, as suggested in option D, would be a good long-term solution, but it seems like a big change to make just for this test.
upvoted 0 times
...
William
5 months ago
I feel like adding Test.startTest() and Test.stopTest() around the right lines could help isolate the test context, but I can't recall if it really affects the query limits.
upvoted 0 times
...
Stanton
5 months ago
I think option B makes sense since reducing the number of Accounts created could directly impact the number of queries. We practiced a similar question about optimizing data creation.
upvoted 0 times
...
Meaghan
5 months ago
I remember we discussed how to manage SOQL limits in our study group, but I'm not sure if adding Test.startTest() and Test.stopTest() will actually help with the query limit issue.
upvoted 0 times
...
Mariko
5 months ago
This seems like a straightforward question about configuring the Scheduling Policy. I think the key is to ensure that only active resources are assigned to service appointments.
upvoted 0 times
...
Bobbye
5 months ago
Okay, let me think this through step-by-step. I need to identify the key characteristics of the Data page definition.
upvoted 0 times
...
Carlene
5 months ago
I think I remember discussing the differences between option A and option B in class, but I'm not completely sure.
upvoted 0 times
...
Virgie
5 months ago
Okay, let's see. If the token is doing the PIN checking offline, that means a brute force attack could be possible. I'll go with B.
upvoted 0 times
...
Silva
5 months ago
Okay, I think I've got it now. The key is that the rules have the same priority. In that case, the denial policy (rule 1) takes precedence over the allowed policy (rule 2), so A is the correct answer. And if the rules have different priorities, the one with the smaller priority number takes effect, so C is also correct.
upvoted 0 times
...
Nu
5 months ago
This looks straightforward. I'll focus on the key benefits mentioned in the document - modifying implementation without affecting interface, controlling access, and enabling communication between components.
upvoted 0 times
...

Save Cancel