script:
function escalateItem() {
var res=confirm('Do you wish to escalate this RITM? This will send a notification to the fulfilment groups that the tasks are assigned to');
if (res){
gsftSubmit(null, g_form.getFormElement(), 'escalate_Item');
}
}
if (typeof window == 'undefined')
escalate_Item();
function escalate_Item() {
var grTasks = new GlideRecord('sc_task');
grTasks.addActiveQuery();
grTasks.addQuery('request_item', current.sys_id);
grTasks.query();
if (grTasks.getRowCount() > 0) {
current.u_escalation_count += 1;
current.update();
while (grTasks.next()) {
gs.addInfoMessage('escalating task ' + grTasks.number + ' to group: ' + grTasks.assignment_group.getDisplayValue());
gs.eventQueue('ritm.escalate', grTasks, '', '');
}
}
}
Comments
Post a Comment