How do you disable a service portal?

robertyoung
Giga Contributor

How do you "turn off" a service portal? We've rolled our own and want to turn off the default "sp" portal.

17 REPLIES 17

reginabautista
Kilo Sage
Hi Robert, please mark my answer correct if this has resolved your issue to remove this from unanswered questions.

SaschaWildgrube
ServiceNow Employee
ServiceNow Employee

You can work with roles, delete the portal records, remove menu items, rename the portal to a random string, add client side JS code to redirect to a different page - but all of these measures somehow damage or even destroy the OOTB capabilities - which may become relevant in the future - you never know.

I suggest to add a boolean field to the sp_portal table and add a before query business rule that - for non-admin users - adds a query filter for that new field.

The result are Service Portals that can be switched on and off as required.

Check this out:

https://github.com/saschawildgrube/servicenow-devtools/blob/master/update/sys_script_5b92005ddb49899...

The DevTools app contains powerful tools and a code library for ServiceNow developers. 

Mark Roethof
Tera Patron
Tera Patron

Hi there,

I would suggest redirecting users:

2021-09-27 Redirect (inactivate) Service Portal, e.g. from /sp to /esc

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Also a valid approach, indeed. A theme however is about design, the redirection is about the user journey. But it's not the only case in which ServiceNow leads us to ignore the separation of concerns principle. 😉

 

smcdonaldaz
Tera Guru

The easiest way I found to deactivate is to select the 404 page as the homepage.  You did not mention the need to redirect to the new portal in your message. For that refer to the other posts. But if you just want the portal inaccessible the 404 works.