how to convert incident to service request using agent workspace

Ashwini35
Tera Contributor

Hi All,

 

I have a requirement to convert incident to service request using ui action through agent workspace, also it should copy few fields from incident to service request like - sd, des, business service.

I am using below code and ui action available oob but I am unable to get sd, des and business service fields details, can someone please guide what I am missing below code - 

function onClick() {
g_form.setValue("state","8");
g_form.setValue("close_code","Converted to Service Request");
g_form.setValue("close_notes","Converted to Service Request");
var result = g_form.submit('sysverb_ws_save');
if (!result) {
//failed form submission
return;
}

result.then(function() {
var params ={};
params.sysparm_parent_table = "incident";
params.sysparm_parent_sys_id = g_form.getUniqueValue();
g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
});
}

2 REPLIES 2

Abbas_5
Tera Sage
Tera Sage

Hello @Ashwini35,
Please refer to the below link's:
https://www.servicenow.com/community/itsm-forum/how-to-convert-an-incident-to-a-service-request/td-p...

https://www.servicenow.com/community/itsm-articles/convert-an-incident-to-a-service-request-approach...

 

Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik

Hi Abbas,

 

This they are doing from native ui of incident form, I want to use agent workspace ui action which is pasted above its converting incident to request but not copying fields. Can you guide on it how to copy field details?