- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2017 11:16 AM
Hi Juliana,
This is what I am using:
To recategorize incident to request, try:
var url = "catalog_home.do?sysparm_view=catalog_default&sysparm_processing_hint=setfield:request.parent="
url += current.sys_id;
action.setRedirectURL(url);
To recategorize request to incident, try:
var incident = new GlideRecord("incident");
incident.initialize();
incident.u_recategorized = current.sys_id; //if you have a recategorized reference field on the incident table
incident.caller_id = current.request.requested_for; //so the request's caller is the same as the incident
incident.short_description = current.short_description;
incident.description = "Recategorized from " + current.number;
incident.impact = 3; //change to your own values
incident.urgency = 3;//change to your own values
incident.description = current.variables.description;// + '\n' + "Recategorized from " + current.number + '\n' + current.cat_item.name ;
incident.insert();
return incident;
}
}
harel