Unable to navigate to native UI, getting redirect to service portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi all,
I have written a script to redirect a particular role to service portal, instead it is now navigating all users including admins to portal and we are not able to open any other thing. I want to disable the ui script but as soon as the table opens it navigates me to portal. Help me to resolve this as no user is able to access their data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @gazalagrawa
ServiceNow provides Landing Page Rules (from the Service Portal Configuration) to redirect users based on their roles or groups. It
Go to: Service Portal > Page Route Maps
Set the User's Homepage to the Portal
- Navigate to: User Administration > Users
you can use above two approach are OOB and it doesn't required any script ,if its role bases approach.
Thanks,
Vignesh
"If this solution resolves your issue, kindly mark it as correct."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
You’ll need to find the UI Script (or JS Include / Theme script) responsible for the redirect and deactivate, in the UI Scripts list search by name or keyword and uncheck Active to disable it, or if the logic is embedded in a Theme via JS Includes, open the associated Theme record and remove or conditionally wrap the redirect code (for instance checking g_user.hasRole('admin')) so admins aren’t redirected.....you may also consider using Page Route Maps or Landing Page Rules (under Service Portal Configuration) instead of script redirects, which are more maintainable and less error prone.....
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.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
