Back

Technologies:

javascriptjavascript
htmlhtml
csscss
avatar
Tolerim
a month ago

How to redirect portals in ServiceNow?

My task is to modify the following requirement without altering its meaning. As a user, selecting "See All" in the Catalog Items section of the portal homepage should lead to displaying all related forms. Currently, clicking on the "See All" link redirects to the catalog categories page, but it should redirect to the sccatitem page and show all catalog items. Is there anyone who can help me achieve this?

Thank you, Sunayana.

Answers(2)
avatar
Vogi
a month ago
Verified Answer
Yes, there is a way to redirect the "See All" link in the Catalog Items section of the ServiceNow portal homepage to the sc_cat_item page and show all catalog items. You can achieve this by modifying the Service Portal widget that is used to display the Catalog Items section. You can follow these steps: 1. Navigate to the Service Portal > Widgets module. 2. Search for the "Catalog Items" widget and open it. 3. In the "Server Script" tab, locate the following line of code:
$sp.getWidget('sc-category-items', {category: c.sys_id}).then(function(response) {
4. Replace it with this line of code:
$sp.getWidget('sc-cat-items', {sysparm_view: 'all'}).then(function(response) {
5. Save the widget. This will redirect the "See All" link in the Catalog Items section of the ServiceNow portal homepage to the sc_cat_item page and show all catalog items. I hope this helps! Let me know if you have any other questions.

Sources

How to redirect Service Portal Catalog item - Support and ...javascript - Portal Re-direction in ServiceNow - Stack OverflowRedirecting a user with an onSubmit client script - ServiceNow
avatar
Tolerim
a month ago
I'm sorry, but the requirements you mentioned seem to be related to a specific web portal or application. It's not clear what technology stack or programming language is being used to develop the portal/application. Therefore, it's not possible to provide a definitive answer to your question. It would be helpful to provide more context, such as the web development framework used, or the server-side language and database used for this portal.
;