Create a request UI Action for agent Workspace

Ricardo Sanche3
Tera Contributor

I haven't worked on UI action enough to understand this ask: How do you expand this code to match this requirement?

When this UI action is selected, a new Request Item is automatically created.

The fields of the new Requested Item are populated according to the mapping provided in the table below.

Generic Request Catalog Item VariableInteraction Field
Requested ForOpened for
Short descriptionShort description
DescriptionDescription

The attachments on the Interaction are copied over to the Requested Item.

 After the request is submitted, the work notes of the Interaction are updated with the following text:

"Request ${number} has been created"

 

 

function onClick() {
var result = g_form.submit('sysverb_ws_save');
if (!result) { // failed form submission
return;
}
result.then(function() {
var params ={};
params.sysparm_parent_table = "interaction";
params.sysparm_parent_sys_id = g_form.getUniqueValue();
g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
});
}

 

Create a request UI Action.JPG

1 REPLY 1

Community Alums
Not applicable