-
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

3 Rules that Trigger the right Actions for Salesforce– Pardot Engagement Studio Best Practices!
Engagement Studio is the next-generation lead nurturing tool of Pardot that enables you to effectively track and manage customer journeys throughout the campaign lifecycle. It…

Salesforce Apex Trigger
By using Apex triggers, you may execute custom code before and after specific Salesforce record events, such as inserts, changes, and deletes. Apex offers trigger…

Demand and Impact of SF Certification on Career and Compensation
Salesforce certifications have emerged as a beacon for proficiency and expertise in the CRM industry, distinguishing committed professionals from the competition. The year 2023 has…
Popular Salesforce Videos
Lightning Data Service: An Easy Way to Build Lightning Components Without Code
Lightning Data Service is a centralized data caching framework which is used to load, save, create and delete a record without server-side apex code. It…
Discover Lightning Web Components | Salesforce Tutorial
Watch this Salesforce tutorial. After completing this unit, you’ll be able to: Explain the Lightning Web Components programming model. List the benefits of using Lightning…
How To Build a Kanban View Using LWC without APEX | Real-Time Project in LWC | Salesforce
In this project, you will learn 60% of the LWC. You gonna learn the following topics 1. How to create a lightning Page 2. How…