+ Start a Discussion

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

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

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?

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