You need to sign in to do that
Don't have an account?

Email Template V.2
Hello Everyone,
I am fairly new to Salesforce. I have encounter this issue and would like to see, is there anyone that can help me with this roadblock that I have encounter? Is there any documents, videos or anyone who can help me with pertaining to how to run a query to find email templates that contain a certain string ex: Pasta that would also include the subject line and content, and trigger if possible
I am fairly new to Salesforce. I have encounter this issue and would like to see, is there anyone that can help me with this roadblock that I have encounter? Is there any documents, videos or anyone who can help me with pertaining to how to run a query to find email templates that contain a certain string ex: Pasta that would also include the subject line and content, and trigger if possible
you can use SOQL to fetch email templates
EmailTemplate etId = [Select id, from EmailTemplate where name = 'email template name'];
however this wont help you in searching for a certain string in an email body because it is a long text field, it cannot be filtered better approach is to export all templates and do a quick search using eclipse IDE or Workbench and do a search.
If you use the Workbench (https://workbench.developerforce.com), you can select the SOQL Query option from the Queries menu and then run a SOQL on the EmailTemplate object or you can also use dataloader to export the email templates in csv format.
good luck !
All Answers
you can use SOQL to fetch email templates
EmailTemplate etId = [Select id, from EmailTemplate where name = 'email template name'];
however this wont help you in searching for a certain string in an email body because it is a long text field, it cannot be filtered better approach is to export all templates and do a quick search using eclipse IDE or Workbench and do a search.
If you use the Workbench (https://workbench.developerforce.com), you can select the SOQL Query option from the Queries menu and then run a SOQL on the EmailTemplate object or you can also use dataloader to export the email templates in csv format.
good luck !