The CreatorCon Call for Content is officially open! Get started here.

UI action Script help to convert incident to HR case

NARENDRA KAMMIL
Tera Contributor

Hello Is it possible to achieve this use case ?

When on an Incident up on clicking UI action (convert to HR case) it should land on HR portal page and user can select any ITEM on that HR portal . up on creating HR request the incident should be closed complete and Parent of HR case should be set as Incident 

 

Below is the code I am using , we have similar user case for request , instead of Portal it will redirect to Native view and is working fine.

 

 

UI action code for create HR case ( which is only working till redirecting to portal) 

var reqFor = current.caller_id.sys_id;
var reqItem = '6ce192b84fbe6e40cc05334d0210c785';
var number = current.sys_id;
gs.addInfoMessage("Submitting this Case will close incident "+current.number);
var url ="esc?id=emp_taxonomy_topic_standard&topic_id=c12227ffc3655510c8157a4ce00131df"+"&sysparm_processing_hint=setfield:request.parent=";
url += current.sys_id;
action.setRedirectURL(url);

 

 

UI action code for create Request for Incident ( which is  working ) 

 

//Update saves incidents before going to the catalog homepage
current.update();
gs.addInfoMessage('Note: Your incident will be closed if you submit this request');

var url = "catalog_home.do?sysparm_view=catalog_default&sysparm_processing_hint=setfield:request.parent=";
url += current.sys_id;

action.setRedirectURL(url);

 

 

0 REPLIES 0