- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2015 11:29 AM
I am trying to put the variable data into the "Email assigned to group (sc_task)" email notification so that the task assignment group will see what has been ordered, but am having no luck. We have it on the Approval Request notification using the Notification Email Script below. Does anyone have your catalog task emails including variable information?
We are on Fuji. All help is appreciated!
template.print("<b>Summary of Requested items:\n</b>");
var item = new GlideRecord("sc_req_item");
item.addQuery("request", current.sysapproval);
item.query();
while(item.next()) { template.print(item.number + ": " + item.cat_item.getDisplayValue() + "\n");
/*template.print("\n");*/
var keys = new Array();
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id); set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getDisplayValue() != '') {
template.space(4); template.print(' ' + vs.get(i).getLabel() + " = " + vs.get(i).getDisplayValue() + "\n");
}
}
}
Solved! Go to Solution.