Different portals based on user's company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2017 06:16 AM
Hello Everyone,
Has anybody worked on Service Portal user redirect to Specific portals based on some conditions ?
I have a requirement where there a multiple portals for different companies and when user login to the Servicenow, User should
navigate into their company's portal.
For example : There are different portals for "X" and "Y" companies and If i belong to a "X" company ,i should be navigated into"X"Company's portal.
Your feedbacks are much appreciated.
Thanks & Regards,
Karthik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2017 08:23 AM
Karthik,
I've done this exactly. You'll need to use a UI Script with the following event name in it:
This will ensure that the script doesn't run until you have access to all the functions you need to use to run queries of the user table, or the Session Client Data.
Once you have this in your script, just run your queries and do your comparisons to figure out where the person should go. Once you determine where they're supposed to go, you'll use this code to redirect them:
where window.top.location.href = the url of the portal to which you want to direct the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2018 08:18 PM
Hi Karthik,
I have exactly the same requirement to design different portals based on the user's company and struggling to get this working. Really appreciate if you can to post the code in here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2017 05:17 AM
Hi Andrew,
Thanks for your response. I tried doing the same but it doesn't seems to be working and navigates to dashboard homepage . It doesn't navigate to any of the portals after login. Do you mind sharing the sample code please ?
Regards,
Karthik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 06:20 AM
It might be more useful for you to post your code. That way I could tell you what was wrong with it, instead of you trying to guess how to adapt mine.