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

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