I'm running a batch that updates several custom objects. Sometimes I get a mixed_dml error but it's not something I can reproduce, It's an intermittent error. The message that is thrown is:

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): myCustomObject__c, original object: CustomExperience: [].

What is this CustomExperience object? I'm not directly using it and had no idea it existed.

  • Very interesting...can you add your code? – Adrian Larson Jan 12 '17 at 20:01
  • Find out the Trigger which is updating a setup object based on custom object fields. Not all that custom object records are same. Find out that record. – Ashwani Jan 12 '17 at 20:03
  • Interestingly, CustomExperience doesn't show up in my key scanner, either, although I suppose it might be a newer object and I Just need to update my API version. – sfdcfox Jan 12 '17 at 20:17
  • 1
    Is your org in Spring 17 by any chance? – sfdcfox Jan 12 '17 at 20:20
  • 2
    You should definitely open up a case with support for this one if you are able to and haven't already. – Adrian Larson Jan 12 '17 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.