Email Script template.print issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 03:04 AM
Hi All,
I have written notification email script which is not working. Can any one help me where i did mistake?
In logs i am getting value but in template.print these values are blank, please help me
//workflow run script
var catman =current.variables.manager.getDisplayValue();
gs.eventQueue('te.notify.manager', tsk, num, catman);
tsk.update();
//email script
var count = event.parm1;
var man = event.parm2;
var val = man.getDisplayValue();
template.print("manager:"+ man);// blank value cmng
gs.log("Manager:"+man);//values i am getting in logs
gs.log("Count:"+count);
template.print("Count:"+count);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 03:11 AM
Hi Gayathri,
Please find below correct code as your already sending display value in parm2 so no need to do getDisplayValue() again.
var count = event.parm1;
var man = event.parm2;
**Please remove this line "var val = man.getDisplayValue();"
template.print("manager:"+ man);// blank value cmng
gs.log("Manager:"+man);//values i am getting in logs
gs.log("Count:"+count);
template.print("Count:"+count);
Please try and mark correct if helpful
Thanks
Mohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 03:22 AM
hi mohit,
i tried with and without getdisplayvalue, still unable to print event.parm2 values using template.print

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 03:17 AM
Hi Gayathri,
Code looks correct except you don't need var val = man.getDisplayValue();
BTW are you calling correct variable.? and also are you calling correct script in email notification like below.?
${mail_script:name_of_script}
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022 03:21 AM
hI MUSAB,
ya i am using correct script , in logs i am getting correct value, other template.print values i am getting