+ Start a Discussion

DML Not Executing In Class Called By Visualforce Component

I am trying to execute DML to insert a task and update a record in a class called by a Visualforce email template/Component, so I added AllowDML="true" to the Component. However, when my VF email is sent, I'm getting the "This Message has no Content" when I include the DML code.


Right now, I have the DML commented out in the class and the email comes out fine, with all of the data I need.  Any suggestions on how to execute DML properly when called by a Component so my email is ok and records are updated properly?