How can I get a UI action on agent workspace interaction to directly open a specific catalog item?

georgeprad
Mega Expert

On agent workspace I have a UI action to create request from an interaction. But this UI action opens the service catalog and then the agency has to select a form from the catalog. Instead of this I want the UI action to open a specific form i have created for this and i want the details captured in the interaction to be copied on to this item like the create incident UI action does. Can anyone help me with this? I tried the setRedirectUrl but this did not work. Not sure how to achieve this. 

1 ACCEPTED SOLUTION

T_Prashaanth
Mega Guru

Found the way for this ,it worked.Create a ui action with Workspace Client Script:

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', 'sys_id of the catalog item' ,'-1', params); });

}

Mark it correct if this is useful.

View solution in original post

13 REPLIES 13

You can make use of this community article for passing paramaters from interaction to catalog form for autopopulating values.

https://community.servicenow.com/community?id=community_question&sys_id=3dcb8042dbc44818fff8a345ca96...

Amrit Kumar Pal
Tera Contributor

On clicking Create Request UI Action, i want to display all Catalog items of different Catalogs (i.e Service Catalog,Customer Service,Consumer Service).

OOB it displays only catalog items which are under Service Catalog.

Looks like you can change this portal (swp) - sp_portal.do?sys_id=fe5506d03b0203008ed00d8044efc45d

 

Note: If anyone figured out the way to pass in a portal instead of using that portal, I would prefer that. The parameters seem to be a blackbox.

Community Alums
Not applicable

Update to this post. I found a solution to passing variables from interaction to Catalog Item on another post and it works well for me:

https://www.servicenow.com/community/csm-forum/passing-variables-from-interaction-record-ti-catalog-...

 

Hope this helps someone