Salesforce
PDII · Question #215
PDII Question #215: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #215. The question stem and answer options stay visible for context.
Question
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?
Options
- ARewrite the business logic and test classes with @TestVisible set on the callout
- BSet seeAllData to "true" at the top of the test class, since the code does not fail in practice
- CUse test.IsRunningTest() before making the callout to bypass it in test execution
- DCall support for help with the target endpoint, as it is likely an external code error
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.