Is it possible to set the subject of an email client template using an email script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2019 08:02 AM
I have created a custom email client template in my pdi which uses the London version.
I would like the subject to be set using an email script.
I am able to set the content of the email client template using the following for example:
template.print('hello world');
However, if I try to set the subject of the email client template using the following code in an email script:
email.setSubject('hello world');
This does not set the subject.
I have checked the system log, the email seems to be returning a value of null (please see attached screengrab).
Does anyone have any suggestions of how I would be able to set the subject using an email script? Or is there a known error that anyone is aware of? It is not an option for me to use the subject field provided in the email client template.
Thanks,
Sue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 01:06 AM
Hi Alexander,
I've had another try and am still unable to get this working.
Out of interest, how were you able to get it to work? Is your version London?
Thanks
Sue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 07:38 AM
Hey Sue,
There may be issues on London with emails as well. I would go ahead and send the email and test it to see if the subject shows up. The instances I am currently using are on Madrid and London. It does work when it shows up for me.
The only other thing I can think of is to try a separate script for just the subject and see if it works that way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 07:46 AM
Hi Alexander,
Thanks for your response.
I will give it another try and see how I get on.
Thanks again and Best wishes,
Sue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 11:55 PM
We're on Orlando, and I confirm this is not working.
There's no way at all to change the Email Client Subject.
Very frustrating.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2020 05:02 AM
This functionality isn't yet available but I found an Idea in the idea portal that could use some upvoting for it - https://community.servicenow.com/community?id=view_idea&sysparm_idea_id=4fd696bddba444100be6a345ca96...