- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 02:01 PM
Hi Team,
I have a requirement to populate one of the catalog variable as "Email Subject". I wrote a email script and trying to embed the script on Subject line but its not working.
Please check the screenshots and appreciate any help.
Same script working on body section, but subject the same script not working.
Solved! Go to Solution.
- Labels:
-
Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 04:57 PM
Hi,
I don't believe mail scripts work in the subject line. The message body is where it gets executed from...and you can set the subject with the script:
email.setSubject("This is the new subject line");
You can also use just this in your subject:
This is my subject and here is a variable: ${current.variables.variable_name}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 04:06 PM
I think you can put mail scripts that have to do with subject into the body of the notification and they will work as long as the mail script setup right.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 04:57 PM
Hi,
I don't believe mail scripts work in the subject line. The message body is where it gets executed from...and you can set the subject with the script:
email.setSubject("This is the new subject line");
You can also use just this in your subject:
This is my subject and here is a variable: ${current.variables.variable_name}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 09:49 AM
thanks for the help.