Mixed DML Operation Error


Cause: When there is a combination of DML operations for both Setup and Non-Setup objects in the same transaction.

Solution: Use @future annotation to do DML operation or use the same logic in a batch class.

Comments