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

Workspace UI Action - Redirect Question

Michael H1
Tera Guru

Hi,

 

I have been unable to find an answer to this specific question but is it possible to have a UI Action redirect to a specific catalog item? Outside of Workspaces, it is relatively straight forward to have the agent/user redirected to a specific catalog item, such as below:

 

 

gs.setRedirect('com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=a12345678fakesysid');

 

 

In Workspaces, I see the out of the box "Create Request" UI Action performs the following to redirect to the overall Service Catalog:

 

//Update saves interactions before going to the catalog homepage
current.update();
var url;
var activeCatalogsCount = sn_sc.Catalog.getCatalogCount();
if (activeCatalogsCount === 1) {
    url = "catalog_home.do?sysparm_view=catalog_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}
else {
    url = "catalogs_home.do?sysparm_view=catalogs_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}

action.setRedirectURL(url);

 


Does anyone know how to set up a Redirect URL to direct the agent/user to a specific catalog item? As of right now, none of my attempts have worked, the form's page just reloads.

2 REPLIES 2

nataliya_b
Tera Guru

maybe you could try to set it up like

 

now/sow/record/sc_cat_item/catitemsysid

 

 

Worked for me, thanks a lot!