+ Start a Discussion
sundar s 24sundar s 24 

emailtemplate name

if i change email template name do i need to change whereever it is referred
PriyaPriya (Salesforce Developers) 

Hi Sundar,

Yes you need to update where you have hard coded template name. For e,g you might have used it in some query in code like below :- 

EmailTemplate templateId = [Select id, from EmailTemplate where name = 'Waitlisted opportunity now open'];

So here you need to update the name in your code.

If the above information helps you, please markt it as best answer.


Priya Ranjan

sundar s 24sundar s 24
1. how i do know where and all its refered
2. if the email template is used in any email alert do i need to change there too
Suraj Tripathi 47Suraj Tripathi 47
Hi Sundar,

If you change the email template name it will automatically change where ever it was referred.

If you find your answer mark this as best answer.

Thank you!
Suraj Tripathi 
mukesh guptamukesh gupta
Hi Sunder,

I have tried my side , when i change the name of Email Template then name reflect on used location, but we can't change the API name.

User-added image

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.