You need to sign in to do that
Don't have an account?
gaiser
DML not allowed on setup entity (trying to create EmailTemplate )
I am trying to create EmailTemplate from Apex Class (in Sandbox) but system complains in the line where I do
------------
insert mytemplate;
------------
Error message states: Compilation error: DML not allowed on setup entity
Apex Developer's Guide in section "SObjects That Do Not Support DML Operations" does not mention anything about EmailTemplate and hence I assume that creation of EmailTemplate is absolutely legal.
Is it a bug in the documentation or in SFDC Apex Compiler?
Has anyone else experienced similar problem?
------------
insert mytemplate;
------------
Error message states: Compilation error: DML not allowed on setup entity
Apex Developer's Guide in section "SObjects That Do Not Support DML Operations" does not mention anything about EmailTemplate and hence I assume that creation of EmailTemplate is absolutely legal.
Is it a bug in the documentation or in SFDC Apex Compiler?
Has anyone else experienced similar problem?