Salesforce
PDII · Question #211
PDII Question #211: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #211. The question stem and answer options stay visible for context.
Question
A developer has a test class that creates test data before making a mock call-out, but now receives a `榊ou have uncommitted work pending. Please commit or rollback before calling out' error. What step should be taken to resolve the error?
Options
- AEnsure both the insertion and mock callout occur after the Test.startTest()
- BEnsure both the insertion and mock callout occur after the Test.stopTest()
- CEnsure the records are inserted before the Test.startTest() statement and the mock callout occurs
- DEnsure the records are inserted before the Test.startTest() statement and the mock callout after
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.