-
Is there any way to perform DML operations from visualforce email templates?
Visualforce email templates allow you to include visualforce components with allowDML="true" but there doesn't appear to be any way to actually use DML. But getting these when trying to implement :-
You can't use data manipulation language (DML) operations in a “getxxx” method in a controller.
You can't use data manipulation language (DML) operations in a constructor method in a controller.
So is there any way to do this?
Log In to reply.
Popular Salesforce Blogs

Running Metadata API in Apex as a specific user
Running Metadata API in Apex as a specific user Calling the metadata API in Apex requires admin permission or at least the "Modify All Data"…

Apex Intention Actions: The Next Frontier for Apex Completions
Idea from IDEa Recently, I needed to code a little tool in Java. The last time I coded something in Java was in high school,…
Popular Salesforce Videos
What is Sales Cloud in Salesforce? | How it can Help Any business?
In this video, Shrey is not only teaching but also demonstrating the concept of Sales Cloud in Salesforce. 1. What is sales cloud in Salesforce?…
How I Really Feel About Salesforce
A deep dive into the state of the Salesforce industry in 2021, such as: - Is Salesforce going to crash in the foreseeable future? -…
Tip Calculator in Lightning Component SalesForce ☁️
In this video, I will create a calculator in Lightning Component. It won't be an ordinary calculator, it will be a Tip calculator for Restaurants…