Create a specific request from UI Action in CSM

lexy
Kilo Expert

Hello All,

I have a UI action on my Case application that I want my end-user to use to create a Catalog item. I want to link this button to a specific catalog item so that when users click on the button, it will open the specific catalog item and associate  it with the parent case. Please does anyone an idea as to how best to have this done?

 

Currently, Create Request button opens the service catalog and users have to search through categories to get to the item, I want to take users to directly to the item. Any help will be appreciated.

Thank you

1 ACCEPTED SOLUTION

DirkRedeker
Mega Sage

Hi again

I just was investigating a bit, what happens in the background.

The default UI Action "Create Request" will open the "catalog_home.do" (or "catalogs_home.do") UI Page, using some parameters to identify, to which "parent" the new Request should be linked.

Having the "parent mapping" in place (> Service Catalog > Catalog Administration > Request Parent Mapping) for your table, the newly created Request should be "attached" to your parent automatically after creation.

As you wrote, that takes you to your catalog MAIN page, but you want to go to a specific Catalog Item directly. Look at the URL in your browser, that displays, when you manually NAVIGATE to your Catalog Item.

I guess if you have a look at the URL created by the OOB UI Action (Form Menu), and construct a similar using the given parameters, but linking directly to an existing catalog item, will do your job!

For example, if I navigate to some catalog Item, the parameters (for the initial UI Action call) are forwarded each time:

> sysparm_parent_sys_id

> sysparm_parent_table

This needs to be put in your custom UI Action redirecting to a link similar like below.

https://dev54908.service-now.com/nav_to.do?uri=%2Fcom.glideapp.servicecatalog_cat_item_view.do%3Fv%3D1%26sysparm_id%3De46305bdc0a8010a00645e608031eb0f%26sysparm_link_parent%3D900682363731300054b6a3549dbe5d5f%26sysparm_catalog%3De0d08b13c3330100c8b837659bba8fb4%26sysparm_catalog_view%3Dcatalog_default%26sysparm_parent_sys_id%3Dac02f83c07fe80100e26f48f7c1ed094%26sysparm_parent_table%3Dsn_customerservice_case%26sysparm_view%3Dcatalogs_default

 

Let me know if that works for you. Thanks!

BR

Dirk

View solution in original post

5 REPLIES 5

Prateek kumar
Mega Sage

Please check this out:

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


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

I followed the instructions but it didn't work. I will lost my Steps

 

1. UI Action:

find_real_file.png

 

2. UI Page

find_real_file.png

Mike Patel
Tera Sage

on UI Action change window.open(url); 

to

 window.location = url;

DirkRedeker
Mega Sage

Hi

Maybe this one helps you further:

https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-management/task/create-request-from-other-flow.html

Let me know.

BR

Dirk