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 2 Question 20 Discussion

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

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Amie
4 months ago
Not sure about C, calling support seems like overkill for this issue.
upvoted 0 times
...
Louvenia
4 months ago
A is definitely not the way to go, rewriting is too much hassle.
upvoted 0 times
...
Cherrie
4 months ago
Wait, is it really okay to bypass callouts in tests?
upvoted 0 times
...
Irving
4 months ago
I disagree, I think B could work too.
upvoted 0 times
...
Avery
4 months ago
Option D seems like the best choice here.
upvoted 0 times
...
Tammi
5 months ago
Calling support seems unnecessary; the error is likely due to the test setup. I feel like I've encountered this scenario before, but I can't recall the exact fix.
upvoted 0 times
...
Aja
5 months ago
I think rewriting the business logic with TestVisible could be overkill. I wonder if there's a simpler solution like option D.
upvoted 0 times
...
Fallon
5 months ago
I'm not entirely sure, but I think setting seeAllData to true might help. It feels like I've seen that in practice questions before.
upvoted 0 times
...
Krissy
5 months ago
I remember something about uncommitted work causing issues with callouts in tests. Maybe option D is the right way to bypass it?
upvoted 0 times
...
Jolene
5 months ago
I'm a little confused by the wording of the question. Are we looking for a measure that prevents future attacks, or one that responds to an ongoing attack? I'll have to re-read the options carefully.
upvoted 0 times
...
Stefan
5 months ago
Wait, I'm confused now. If the scatter decreases, doesn't that mean the r-squared value should get smaller, not larger? I need to review my notes on interpreting r-squared before answering this.
upvoted 0 times
...
Annabelle
5 months ago
Okay, the question is asking about the privilege level assigned to VTY users. Let me see if I can find that information in the exhibit.
upvoted 0 times
...
Madalyn
5 months ago
I think it's the "infra" tenant for in-band management, but I'm not 100% sure. Maybe I should have reviewed that more.
upvoted 0 times
...
Myra
5 months ago
I've got a good strategy for this. I'll break down the process step-by-step and critically examine each step to see where I can streamline or remove any unnecessary tasks.
upvoted 0 times
...

Save Cancel