function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
devNut!devNut! 

What does this mean: "Loop variable must be an SObject or list of EmailTemplate" ?

Hi,
Trying to run the following statement that simply queries the EmailTemplate standard object

Code:
for ( EmailTemplate et : [ select Id, Name, Body from EmailTemplate  ] )
{
System.debug(logginglevel.DEBUG, 'obj data: '+et);
}

 
but getting the error:
Save error: Loop variable must be an SObject or list of EmailTemplate


Can anyone shed some light?


tmatthiesentmatthiesen
Can you provide your complete code?  The pasted code seems to work fine in the system log console.




Message Edited by tmatthiesen on 08-26-2008 12:37 PM