To fix MIXED_DML_OPERATION error(setup and non-setup objects) in Salesforce

The following error will be occured if you’re trying to perform DML operation on both setup and non-setup objects in the same transation. ` MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): CustomObject__c, original object: User: [] ` Here is the sample code that […]

read more