var item = new GlideRecord("sc_req_item");
item.addQuery("sys_id", current.sysapproval);
item.query();
while (item.next()) {
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i = 0; i < vs.size(); i++) {
var sLabel = vs.get(i).getLabel() || '',
sValue = vs.get(i).getDisplayValue() || '';
if (sLabel != '') {
template.space(4);
template.print(' ' + "<strong>" + sLabel + "</strong>" + " = " + sValue + "\n");
}
}
}
var attachment = new GlideSysAttachment();
var agr = attachment.getAttachments('sc_req_item', current.document_id);
if (agr.next()) {
template.print(gs.getMessage("notif.ritm_attachments_present"));
}
Comments
Post a Comment