You need to sign in to do that
Don't have an account?
jgrenfell
Using FolderId in the Where clause of an EmailTemplate Query
I'm creating a page that includes a list of Folders for email templates, and when the user selects a folder, I want to display the EmailTemplates in that folder. I'm getting an error on the SoQL to do that though- "unexpected token : FolderId". The same query works fine in the Schema Explorer in Eclipse.
List<EmailTemplate> ets = [Select Id, Name From EmailTemplate where FolderId := this.eFolder];
Anyone have any ideas?
I think you fudged the binding, it should be
List<EmailTemplate> ets = [Select Id, Name From EmailTemplate where FolderId = :this.eFolder];
All Answers
I think you fudged the binding, it should be
List<EmailTemplate> ets = [Select Id, Name From EmailTemplate where FolderId = :this.eFolder];
List<EmailTemplate> ets = [Select Id, Name From EmailTemplate where FolderId = :this.eFolder];
Edit: Too slow again. SimonF got it.