cat items
Otherwise use: current.variables.u_rights.getDisplayValue()
// Set the Description of the REQ
var req = new GlideRecord('sc_request');
if (req.get('sys_id', current.request)) {
req.description = "Assign rights to a Server "; //+current.cat_item.getDisplayValue()+'';
req.short_description = "Assign rights to a Server "; // +current.cat_item.getDisplayValue()+'';
req.update();
}
// Set the Description of the RITM
var ritm = new GlideRecord('sc_req_item');
if (ritm.get('sys_id', current.sys_id)) {
var desc = "Request for '" + current.variables.u_rights.getDisplayValue() + "' access rights for '" + current.variables.requested_for.getDisplayValue() + "'. \n";
if (current.variables.u_limitation == 'limit') {
desc = desc + "Limited access requested for " + current.variables.u_duration_in_days + " days. \n";
} else {
desc = desc + "Permanent access requested. \n";
}
desc = desc + "Access to Server: " + current.variables.server_name.getDisplayValue() + "\n";
ritm.description = desc;
ritm.update();
}
Comments
Post a Comment