ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 5 - Certified Platform Developer II discussion

Report
Export

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.
Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
Answers
A.
Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
B.
Remove the Database.setSavepoint and Database.rollback.
Answers
B.
Remove the Database.setSavepoint and Database.rollback.
C.
Move the CalloutUtil.makeRestCallout method call below the catch block.
Answers
C.
Move the CalloutUtil.makeRestCallout method call below the catch block.
D.
Change the CalloutUtil.makeRestCallout to an @future method
Answers
D.
Change the CalloutUtil.makeRestCallout to an @future method
Suggested answer: D
asked 23/09/2024
Chris OMalley
26 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first