Copy incident data to request using oob create request ui action

Ashwini35
Tera Contributor

Hi All,

 

I have a requirement to copy incident data to request while converting incident to a requests using oob create request ui action in agent workspace. Please below code which is present in oob create request ui action which is configured under ITSM workspace application.

Below code is scripted under workspace client script-

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);
});
}

 

I need to copy incident short description and description to request when its getting converted to request. Please guide me on the ablve query.

 

Thanks

1 REPLY 1

Ashwini35
Tera Contributor

Can someone please help me on this issue?