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
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.

Regards,

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,
Greeting!

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!
Regards,
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.

Thanks
Mukesh