
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016 11:42 AM
I found this: Dynamic subject in an Email notification
But no answer.
I'm trying to call a mail script because I need a dynamic subject line:
However, when the email comes in, I get this as my subject line: ${mail_script:dynamic_subject}
Is a dynamic subject line possible?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016 11:44 AM
Hi David,
Call the dynamic_subject script from within the message body.
It should contain a line like this:
email.setSubject("This is the new subject line");
Scripting for Email Notifications - ServiceNow Wiki
Email Notifications - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016 11:44 AM
Hi David,
Call the dynamic_subject script from within the message body.
It should contain a line like this:
email.setSubject("This is the new subject line");
Scripting for Email Notifications - ServiceNow Wiki
Email Notifications - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2016 11:46 AM
Genius.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2016 01:03 PM
Hey Chuck,
the email.subject will be in the <mail_script> tags in the body of the email. But then system will ask you to convert in into a notification script, can we call one notification script in another email notification script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2016 03:55 PM
HI Ravali,
You cannot call one notification script from another one. If you want to centralize your code, consider using a script include and call that from the various mail scripts.