What should be done to address the problem?

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?
A . Remove the Database.setSavepoint and Database.rollback.
B . Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
C . Change the CalloutUtil.makeRestCallout to an @future method.
D . Move the CalloutUtil.makeRestCallout method call below the catch block.

Answer: C

Latest CIS-ITSM Practice Questions with 434 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments