Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Display only one Catalog Category when using the "Create Request" UI Action

SSantacroce
Tera Expert

Hello everyone,
I need to be able to open a Request from an Incident in the Service Operations Workspace, so I've tweaked the Workspace Client Script of the "Create Request" UI Action to my needs and have been using that.
Thing is, whenever I click on the UI Action and open the new tab it automatically opens on the "Popular Items" Page. This allows the user to access all catalogs and all categories - while I only need them to access one catalog and only one category

 

SSantacroce_0-1775223137181.png

 

I've tried adding different parameters, such as -

params.catalog_id = "SYS_ID_OF_MY_CATALOG"; or
params.catalog_id = SYS_ID_OF_MY_CATALOG&id=sc_category&sys_id=SYS_ID_OF_MY_CATEGORY"; or
params.category_id = "SYS_ID_OF_MY_CATEGORY";
 
but none of them changed a thing.
Is there any way to do this?
1 REPLY 1

Naveen20
ServiceNow Employee

The this approach - use g_aw.openPage to navigate directly to the category page, bypassing "Popular Items" entirely.

In UI Action's Workspace Client Script:

javascript
g_aw.openPage({
    route: 'sc_category',
    fields: {
        catalogId: 'SYS_ID_OF_YOUR_CATALOG',
        categoryId: 'SYS_ID_OF_YOUR_CATEGORY'
    }
});

To confirm the exact route value and field names for your instance, navigate manually to the desired category in SOW and inspect the URL hash — it'll show you the route string and parameter names the page expects. You can also verify in UI Builder → Service Operations Workspace → Pages under the catalog category page definition.