MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): User, original object: Account 请注意,当您从Eclipse / Force.com IDE运行测试时,不会发生该错误,但是当您部署到Salesforce然后在Salesforce中运行测试时,就不会发生该错误。
Then we changed this method so that it's not@futureanymore, but this raised the following error:First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): GroupMember, original objec...
System.DmlException: Insert failed. First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): User, original object: LTCVariables__c: [] 解决的办法就是调用异步方法,如果入参是primiti...