How to create Dynamic Subject of email client Template?

Community Alums
Not applicable

I want to set the subject of my email client template:-

I created an email script and used:-

email.setSubject('');

and called the email script with tag ${mail_script:'name od email script'} in the body of the template.

But the value of the subject is not populating.

Please help!!!!!

19 REPLIES 19

sachin_namjoshi
Kilo Patron
Kilo Patron

You don't need '' while calling mail script in email template.

Use below syntax

 

${mail_script:name od email script}

 

Regards,

Sachin

Community Alums
Not applicable

I tried calling mail script in subject but it is returning ${mail_script:'name of email script'}

you need to call mail script in body of email template.

 

Regards,

Sachin

Hi Adarsh,

I believe your email script is not being called. I see that you are using quotation while entering the email script name. Also the email script invoke syntax should be used in the body of email.

It's already mentioned by Sachin in his comment.

Your syntax Should be ${mail_script:name od email script} 

NOT ${mail_script:'name od email script'}

Regards,

Alok