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
pirouz sourati zanjanipirouz sourati zanjani 

calling a visualforce component in the subject of email template

hello 
i'm trying to call visualforce component in the subject of the email template, but i had no success. the template is related to Case object but i have to show one field of the Case's child object in the subject like : " hello user with the   thatField " .
i created a VF component just showing that field in string but it doesnt work. is there even a way to do that ?
 
SandhyaSandhya (Salesforce Developers) 
Hi,

I would suggest you refer below blogs which has step wise guide for the same requirement.

http://www.infallibletechie.com/2013/05/visualforce-email-template-with-custom.html
 
http://amitsalesforce.blogspot.com/2017/05/how-to-create-visualforce-email.html
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya
pirouz sourati zanjanipirouz sourati zanjani
thanks for your replys !!
but these link you shared, all of them are about building the whole thing but i was asking about how to customize the subject of the emial template i want to access other object rather than the Object define in the first place in the Subject of the emial template (the template is related to Case object) like 
 " hello user with the   thatField " .
thatField is related to child object of the Case object.
is that possible to call a component within the subject ?