- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 12:25 PM
I'm trying to set the email notification subject to a requested item number. I can't use just ${number} in the subject field since it pulls the REQ number. What would I need to put after the RITM: to successfully pull the RITM number into the subject field?? The script works when I need to pull the RITM number in the message body. Just not sure how to do it in the subject field. Any suggestions would be great. Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 12:41 PM
try this.
var num = gr.number;
email.setSubject("View RITM: ?????" + num);
Regards,
Vamsi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 12:41 PM
try this.
var num = gr.number;
email.setSubject("View RITM: ?????" + num);
Regards,
Vamsi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2017 12:45 PM
I actually tried email.setSubject("View RITM: " + gr.number); and it worked. Your idea also works. Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2017 01:22 AM
Hi Vamsi,
I tried using email.setSubject line in client template and it's not working for me. Below is my script, please suggest.
<mail_script>
var str = " This is my subject line";
email.setSubject(str);
var gr = new GlideRecord('u_test_email');
gr.addQuery('sys_id',current.sys_id);
gr.query();
while(gr.next()){
var action = gr.getValue('u_email_action');
gs.info("Action Value:"+action);
if(action == '1'){
template.print("Inside forward");
}
else if(action == '2'){
template.print("Inside Send");
}
}
</mail_script>