Payments2Us ManualsPayments2Us - Frequently Asked QuestionsEmail Template - FAQWhy I am getting the error "Mixed DML Exception - DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa)

Why I am getting the error "Mixed DML Exception - DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa)

If you are getting an error message  like the one shown below when trying to mark an email template as active or cloning, then follow the steps in this FAQ

Edit the Visualforce Email Template

Then change the <c:XXXX to <AAkPay:XXXX as in the screenshot example below.
Press SAVE button

If still having issues marking this as available afterwards, then you'll need to Clone the Email Template.

Note, if cloning you will now need to update Flows/Workflows etc. that are using the original.