Salesforce
PDII · Question #401
PDII Question #401: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #401. The question stem and answer options stay visible for context.
Question
A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records. The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?
Exhibit
Options
- ARemove the Database.setSavepoint and Database.rollback.
- BChange the CalloutUtil.makeRestCallout to an @InvocableMethod method.
- CChange the CalloutUtil.makeRestCallout to an @future method.
- DMove the CalloutUtil.makeRestCallout method call below the catch block.
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.
