DML operations are not allowed
1. Inside the constructor.
2. Method which is called from the constructor.
3. Check whether allowDML="true" is set in your apex:Component.
1. Inside the constructor.
2. Method which is called from the constructor.
3. Check whether allowDML="true" is set in your apex:Component.
Cheers!!!
Can i know why Dml doesn't works in Constructor ?
ReplyDeleteThis might help
ReplyDeletehttps://developer.salesforce.com/forums?id=906F000000099dgIAA
action parameter will do the work
Thanks
ReplyDelete
ReplyDeleteright syntex
If a method is called from get methods too will not allow DMLs...
ReplyDeleteConstructor initialising the memory for only veriable.
ReplyDelete