0

I have the following folders where we save the email templates:

Tenders 2021 Tenders 2022 Tenders 2023

I want to run a soql query to fetch all the email templates that are stored in the folders above. I wrote the following queries but both queries return 0 records.

SELECT Id, Name, Subject FROM EmailTemplate WHERE FolderName LIKE '%Tender'

SELECT Id, Name, Subject FROM EmailTemplate WHERE FolderName LIKE 'Tender%'

I am not sure why the LIKE statement doesn't work.

1 Answer 1

1

the following query worked for me

SELECT Id, Name, Subject, Folder.Name, FolderId FROM EmailTemplate WHERE Folder.Name like 'Tender%'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .