
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2019 11:51 AM
I have activated the property that enables the reply, reply all and forward buttons to be visible on emails in the activity stream (glide.ui16.emailStreamResponseActions). I imported the workaround provided in KB0684027. The property is enabled on a global scale. I would like to set the from address based on the record type. I have added the conditions field to the client template. I did an insert and stay on reply-received (though all response types will need to reflect desired change), set the conditions to the desired target table and then populated the from field with the desired value. This did not display the desired outcome. I then tried creating a Notification email script and calling it with ${mail_script}. This too did not provided the desired outcome. These button client templates are all acting on the sys_email table and I need "apayable@example.com" to display in the from field when the target table is u_accounts_payable. I am also in the process of trying a script include instead of an email script. If anyone has any insight into what I'm doing wrong or the better path to achieve the desired goal, please share! Thanks in advance for your help!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 12:31 PM
Paul,
Thank you so very much for taking the time to respond to this post! I appreciate your suggestion though it seems that the script include route is the way to achieve the desired outcome, as the issue is as a result of a product defect documented by PRB1321771, "Using "javascript:" evaluation of the to, cc, bcc, from, and reply-to values in email client template or email client does not execute'.The KB second suggested workaround details the steps to take in achieving the desired outcome via use of a script include.
So if your goal is:
1. To override the email user label (system mailboxes > administration>email accounts> ServiceNow SMTP) and are using a SN provided email account, without deleting it.
2. Dynamically display a generic label and associated email id based on the current record type in the from field on the reply, reply all or forward template available after the activation of these buttons on the emails in the activity stream.
***if you would like to display the currently logged in users info in that field then reference:
https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/notification/task/t_SetFromAddClientTemp.html
then your solution:
1. Create a script include by following instructions at
https://hi.service-now.com/kb_view.do?sysparm_article=KB0722879
Or
2. Request to upgrade to London Patch 5
I hope this helps!
Best wishes,
Volente'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2019 06:01 PM
My recommendation would be
- Disable the From address showing on the email client
- Control this via Business Rule
- Set default from address as Business Technology Support
Create a before insert/update business rule on the sys_email table with condition
- Target table is 'u_accounts_payable'
Your code
current.reply_to = "accounts payable <xxx@yourorg.org>";
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2019 12:31 PM
Paul,
Thank you so very much for taking the time to respond to this post! I appreciate your suggestion though it seems that the script include route is the way to achieve the desired outcome, as the issue is as a result of a product defect documented by PRB1321771, "Using "javascript:" evaluation of the to, cc, bcc, from, and reply-to values in email client template or email client does not execute'.The KB second suggested workaround details the steps to take in achieving the desired outcome via use of a script include.
So if your goal is:
1. To override the email user label (system mailboxes > administration>email accounts> ServiceNow SMTP) and are using a SN provided email account, without deleting it.
2. Dynamically display a generic label and associated email id based on the current record type in the from field on the reply, reply all or forward template available after the activation of these buttons on the emails in the activity stream.
***if you would like to display the currently logged in users info in that field then reference:
https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/notification/task/t_SetFromAddClientTemp.html
then your solution:
1. Create a script include by following instructions at
https://hi.service-now.com/kb_view.do?sysparm_article=KB0722879
Or
2. Request to upgrade to London Patch 5
I hope this helps!
Best wishes,
Volente'