Deactivate a portal and optionally redirect to an alternate portal (Xanadu)
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
Out-of-the-box ServiceNow comes with several Service Portals. What if you want to deactivate some of these portals, and perhaps even redirect users? Since you might not support all of them, not need all of them, don't want users accidentally visiting some of these portals, etcetera.
Up to the Washington DC release this was not possible, or only with some very creative workarounds. With the Xanadu release... out-of-the-box it's been made possible to deactivate a portal and optionally redirect to another portal!
Let's have a closer look!
Pre-Xanadu
A fresh ServiceNow instance comes with these nine out-of-the-box Service Portals. Some serve their own purpose, some have a similar purpose. You might even see a few more on your instance, like Instance Security Center which was out-of-the-box (deprecated), or other ones that come with plugin installations.
If you wanted to deactivate or portal, just no-go. There's no active field available, and deleting a whole out-of-the-box portal feels a bit too much. Only through some workarounds you could prevent users from using a Service Portal directly. For example by changing the login page and the homepage to a 404 page, and removing the Header and Footer from the Theme.
Or what if you would like to redirect users from SP to EC, since EC is the new standard, not possible out-of-the-box. Through some smart workarounds you could force a redirect, like I shared in an article three years ago: Redirect (inactivate) Service Portal, e.g. from /sp to /esc. Basically the article describes how to implement a redirect by adding JS Include and UI Script which are linked to the Theme of the Service Portal concerned.
Xanadu
Browsing the Xanadu RTP release, eureka! Deactivating a portal and optionally redirecting it to an alternate portal.
Basically, an "Inactivate" and "Alternate portal" field were added to the Service Portal table and its Form Layout.
Why ServiceNow decided to name it "Inactive" and not "Active", I have no clue. I can only mention that out-of-the-box there are 827 Active fields, and 4 inactive fields.
ServiceNow did a decent job documenting this new functionality when the Xanadu release notes became available. You can find the release note on this Docs page. There are a few things I want to highlight:
- You can't deactivate the default, you have to make a different Service Portal the default one first;
- You can't deactivate a Service Portal that is configured as an alternate portal by any other Service Portal;
- You can't deactivate or redirect to the Mobile Employee Service Portal (/mesp).
Although not bulletproof, ServiceNow did added a UI Policy (Hide Alternate portal if portal is active) and two Client Scripts (Hide fields & alerts when deactivating t, Portal Deactivation Validations) that should hide the inactive and alternate portal field and perform deactivation validations.
Inactive and Alternate portal fields not visible
Since this functionality is new out-of-the-box with the Xanadu release, why is this not instantly visible at every customer? Customization!
Like with many other new features visible on a Form Layout, if a customer in the past customized the Form Layout, then new out-of-the-box modifications won't automatically appear on the Form Layout. Instead while upgrading a Skipped Record will be created. Unfortunately handling Skipped Records is not something every customer does or understands. And... with the Xanadu release ServiceNow added Skipped Record Rules that amongst others would automatically ignore Form Layouts
. Why ServiceNow did this last bit, I have no clue.
If the Inactive and Alternate portal fields have not been added to your Form Layout, do so yourself.
Result
When a Service Portal is deactivated and anyone tries to open that Service Portal, from now on a clear message is shown. When an alternate portal is set, automatically - and without delay - a redirect in the browser is performed.
---
That's it. Hope you like it. If any questions or remarks, let me know!
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
9x ServiceNow MVP
---
https://www.servicenow.com/community/service-portal-articles/deactivate-a-portal-and-optionally-redirect-to-an-alternate/ta-p/3008172
Mark Roethof