function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sai tarunsai tarun 

Process builder on User object, getting mixed dml exception

Hi All,
I had build Process Builder on User object for,
Whenever Opportunity Owner is Deactivated, that owner's manager will be the new owner of that opportunity.
for this, i had build PB on user object, and if User is deactivated, iam trying to update the Opportunity owner.
But it is throwing MIXED DML EXCEPTION.

Please help me on this.

Thanks
Tad Aalgaard 3Tad Aalgaard 3
Basically, you are trying to update records on different standard setup objects at the same time.  These objects are part of objects that Salesforce has indicated cannot be changed at the same time.  

Below is a link to an explanation of the issue and how to possibly get around it.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_non_mix_sobjects.htm