Activity Forums Salesforce® Discussions How to avoid mixed_DML_operation error in test class in Salesforce?

  • Deepak

    Member
    June 4, 2020 at 3:11 pm

    Use @future to Bypass the Mixed DML Error in a Test Method

  • Pooja

    Member
    June 4, 2020 at 3:11 pm

    Use @future to Bypass the Mixed DML Error in a Test Method
    Mixed DML operations within a single transaction aren't allowed. You can't perform DML on a setup sObject and another sObject in the same transaction.

  • Aditya

    Member
    June 4, 2020 at 3:16 pm

    By using @future method, we avoid the mixed Dml exception in Salesforce

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos