Activity Forums Salesforce® Discussions What sort of error is \"System.CalloutException\"

  • shariq

    Member
    September 5, 2018 at 12:41 PM

    Hi Anurag,

    This error occur when you are inserting any record before any call out. You have to call out first then call any DML operation.

    Hope this helps.

  • shradha jain

    Member
    September 5, 2018 at 12:44 PM

    Hello Anurag,

    “System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out” occurs when you first perfrom callout and then DML in same transaction.

    To resolve this issue you need to perform DML in future method so your callout and DML will be in different transaction.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos