- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2016 02:01 AM
Hello guys,
I need add the watermark in Subject, I tried add the code "${subject_watermark}" or "${mail_script: subject_watermark}" in it, but not work. Show them as below.
I need let the watermark show as below image, I marked it by red box.
Could anyone help me or give me some advice? Much appreciate for your help! Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2016 03:24 AM
Hi Zhifei
Try to create a business rule for sys_mail table
Condition: current.type.changesTo('send-ready')
function onBefore(current, previous) {
var gr = new GlideRecord('sys_watermark');
// gr.addQuery('number', 'MSG0008730');
var email_id = current.sys_id;
gr.addQuery('email', email_id);
gr.query();
if (gr.next())
{
current.subject = current.subject + "Ref:" + gr.number;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2016 03:39 AM
Hi Zhifei xing,
Below thread has exactly same requirement as yours..Please read it
Retrieving the watermark reference # from mail_script
Thanks & Regards,
Govind Kumar Sharma
** mark Correct/helpful based upon impact of response**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2016 08:10 AM
Jim Pisello's response to you in the other thread (Re: Retrieving the watermark reference # from mail_script ) would definitely work, but I guess the real question is why do you need the watermark in the subject line in the first place?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2016 07:14 PM
Hello,
Thank you for your reply, I need the watermark in subject line because if Service now email to the one out of office, Service now would receive a auto responder email, auto responder email body was deleted and the email without the watermark. If I add the watermark in subject where I marked, the auto reply would has the watermark info, we can also add the watermark in the body part, but still not found the correct code. Could you pls help me, tell me the right way add the code in subject or body part? I tried some methods, but always not work. Could you pls show me some example code or screen shots? Much appreciate your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2016 03:24 AM
Hi Zhifei
Try to create a business rule for sys_mail table
Condition: current.type.changesTo('send-ready')
function onBefore(current, previous) {
var gr = new GlideRecord('sys_watermark');
// gr.addQuery('number', 'MSG0008730');
var email_id = current.sys_id;
gr.addQuery('email', email_id);
gr.query();
if (gr.next())
{
current.subject = current.subject + "Ref:" + gr.number;
}
}