body is empty in email notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 09:54 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 04:29 AM