body is empty in email notification.

Juhi Jha
Tera Contributor

Hi Team,

I am trying to trigger a notification  email body is set as empty.

Below is my email script.

var record = new GlideRecord('sc_req_item');
record.get('76af537a87850110e93363150cbb353d'); //replace with your RITM sys_id
var vars = record.variables.getElements(true);
for (var i=0;i<vars.length;i++) {
var now_V = vars[i];
if (now_V.isMultiRow()) {
var rows = now_V.getRows();
for (var j=0; j<now_V.getRowCount(); j++) {
var row = rows[j];
var cells = row.getCells();
for (var k=0; k<cells.length; k++) {
var cell = cells[k];
if(cell.getCellDisplayValue() != ""){
gs.info(cell.getLabel() + ":" + cell.getCellDisplayValue());
}
}
}
}
else
{
var question = vars[i].getQuestion();
if(question.getDisplayValue() != ""){
gs.info(question.getLabel() + ":" + question.getDisplayValue());
}

}
}

 

In the background script it's working but getting blank body 

5 REPLIES 5

Kevin Paul
Mega Guru

@Juhi Jha Hope I have answered your query. Pls mark helpful/correct based on the impact.