Valid Plat-Dev-301 Dumps shared by EduDump.com for Helping Passing Plat-Dev-301 Exam! EduDump.com now offer the newest Plat-Dev-301 exam dumps, the EduDump.com Plat-Dev-301 exam questions have been updated and answers have been corrected get the newest EduDump.com Plat-Dev-301 dumps with Test Engine here:
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 callousUtil.makeRestCallout fails with a "You have uncommitted work pending. Please commit or rollback before calling cut' error. What should be done to address the problem?
Correct Answer: C
The error occurs because DML operations were performed before a callout. To fix this, the callout should be made from an asynchronous method such as one annotated with @future(callout=true), which allows DML operations to be committed separately from the callout. nces: Apex Developer Guide - Making Asynchronous Callouts