You need to sign in to do that
Don't have an account?
Priyanka Bardhan
How to perform dml in VF component used by Visualforce email template via workflow email alert?
DML can be done using attribute allowDML="true" to component.
But as per my understanding, DML can't be done for below cases:
Question: Whether Visualforce email templates allow you to include visualforce components with allowDML="true" and is there any way to actually do DML in case of any error scenario? My requirement is do insert error logs in case of any errors happened /blank PDF generated?
Thanks & Regards,
Priyanka Bardhan
But as per my understanding, DML can't be done for below cases:
- 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.
- You can't use the @future annotation in a “getxxx” or “setxxx” method in a controller, or in the constructor for a controller.
Question: Whether Visualforce email templates allow you to include visualforce components with allowDML="true" and is there any way to actually do DML in case of any error scenario? My requirement is do insert error logs in case of any errors happened /blank PDF generated?
Thanks & Regards,
Priyanka Bardhan