Pre-Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 17 Topic 2 Discussion

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 17 Topic 2 Discussion

PDII Exam Topic 2 Question 17 Discussion:
Question #: 17
Topic #: 2

A developer has a test class that creates test data before making a mock callout but now receives a "You have uncommitted work pending. Please commit or rollback before calling out" error. Which step should be taken to resolve the error?


A.

Ensure both the insertion and mock callout occur after the Test.stopTest().1


B.

Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup.2


C.

Ensure the records are inserted befo3re the Test.startTest() statement and the mock callout occurs after the Test.startTest().45


D.

Ensure both the insertion and mock callout occur after the Test.startTest().67


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.