Email Script template.print issue

Gayathri5
Tera Guru

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);

6 REPLIES 6

Mohit_Gupta
Tera Guru
Tera Guru

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

hi mohit,

 

i tried with and without getdisplayvalue, still unable to print event.parm2 values using template.print

 

Musab Rasheed
Tera Sage
Tera Sage

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

Please hit like and mark my response as correct if that helps
Regards,
Musab

hI MUSAB,

 

ya i am using correct script , in logs i am getting correct value, other template.print values i am getting