Page Route Map Not Working for Portal-Specific Custom Widgets

Deepika Gangra1
Tera Expert

Hi @all ,

Good Evening !!!

 

Requirement:
I have developed custom Service Portal widgets that should be visible only on the custom portal. I want to add these widgets in a way that does not impact any OOB portals (such as sp or esc) and follows best practices.

 

Issue:
I have tried configuring Page Route Maps to separate the routing for the custom portal. Additionally, I cloned the page and assigned a separate route, but the portal is still not behaving as expected and the widgets/pages are not rendering correctly.

 

Question:
What is the recommended approach to restrict custom widgets to a specific portal only, while keeping OOB portals unchanged ?

See the attached screenshots.


Thank you in advance
Deepika

3 REPLIES 3

Deepika Gangra1
Tera Expert

DeepikaGangra1_1-1766515184458.png

DeepikaGangra1_2-1766515188881.png

 

 

kaushal_snow
Giga Sage

@Deepika Gangra1 ,

 

simply cloning pages and using page route Maps won’t by itself restrict the widget.......because route maps control which pages render for which portal urls and don’t automatically block widget visibility.....so the recommended approach is to control widget rendering based on the portal context or user criteria instead of relying solely on route maps........for example adding logic in the widget’s data or link (server/client) that checks the current portal id or a user attribute and only shows the widget when it matches your custom portal....

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant - ServiceNow Class of Legends 2025

Thanks @kaushal_snow  for the reply,

can you please guide to achieve this ..

Thank you in advance.