Email script not showing anything in notification

jthomsen
Tera Contributor

jthomsen_0-1712149278413.png

I created this script to greet the user at the start of every notification, but when I add it to any notification nothing shows up in the preview of the noti

11 REPLIES 11

Community Alums
Not applicable

You cant us "gr.getValue()" that way - use var person = current.caller_id.last_name.toString() instead, as getValue() dot-walked might not work here as expected.

@Community Alums I tried to also include the gender of the caller in the email script and now it´s not showing anything again. Do you maybe know why?

jthomsen_0-1713428029377.png

 

Sandeep Rajput
Tera Patron
Tera Patron

@jthomsen Please use template.print to print text in a notification. Here is an example.

 

template.print("Incident number - " + current.number + "\n");
 

@Sandeep Rajput 

I tried to also include the gender of the caller in the email script and now it´s not showing anything again. Do you maybe know why? 

jthomsen_1-1713428070145.png

 

 

@jthomsen Consider updating your if condition as follows.

 

if(gender=='Male')
{
//Do something
}
else if(gender=='Female'){
//Do something else.
}