Salesforce Certified Platform Developer II (Plat-Dev-301) Exam - Topic 2 Question 20 Discussion
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?
D) Use test.IsRunningTest() before making the callout to bypass it in test execution.
A) Rewrite the business logic and test classes with TestVisible set on the callout.
B) Set seeAIIData to 'true' at the top of the test class, since the code does not fail in practice.
C) Call support for help with the target endpoint, as it is likely an external code error.
Amie
7 months agoLouvenia
7 months agoCherrie
7 months agoIrving
8 months agoAvery
8 months agoTammi
8 months agoAja
8 months agoFallon
8 months agoKrissy
8 months agoJolene
8 months agoStefan
8 months agoAnnabelle
8 months agoMadalyn
8 months agoMyra
8 months ago