function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahma__cRahma__c 

Debug the CalloutException: You have uncommitted work pending

Hi,
I have trigger calling an external Api once an account is updated, I don't have any DML in the trigger and
I'm calling a handler and assigning @future(callout = true) for the method calling the external Api
but having this issue:
System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out*
I have deactivated the workflow assigned to account but still having this issue
and don't see how to debug it even after looking to the developer logs
any thoughts please how to debug this issue ?
Alexander TsitsuraAlexander Tsitsura
Hello Rahma,

Do you perform any DML operations in the future method? Can you please share the code? And you need set the debug logs level for the "Callouts" and the "Database" to info, for others to "None". After that try to find "DML_BEGIN" in the debug log. 

Thank,
Alex