Configure Service Portal as Landing Page

ayman_h
Kilo Sage
Kilo Sage

Is there a way to configure the Service Portal as the landing page when a user hits the https://myinstance.service-now.com URL? I want users to be able to access the Public Service Portal without going through any logins

I have tried playing around with SPEntryPage().getLoginURL() but haven't had any success

1 ACCEPTED SOLUTION

I managed to get this to work by going back to using SPEntryPage().getLoginURL()



This is the code for getLoginURL() function.



getLoginURL: function() {


var session = gs.getSession();


var nt = session.getProperty("nav_to");


var sPage = session.getProperty("starting_page");


if (nt == "welcome.do")


session.clearProperty("nav_to");



if (!sPage && !nt)


session.putProperty("starting_page", gs.getProperty("glide.login.home"));



if(sPage != "side_door.do?"){


return this.portal;


}



},





Dont forget to update the Sys Property glide.entry.page.script to define your getLoginURL function, you refer to this page to do that.


View solution in original post

7 REPLIES 7

Srinivas Balusu
Kilo Guru

Using the UI Scripts discussed in the below thread you should be able to do that.



UI Script to redirect non roled users to ESS not working properly.


Thanks but this solution will still require me to login first and then redirect. I want something that will take the user straight to the /sp/ as they hit https://myinstance.service-now.com



Thanks,
Ayman


I managed to get this to work by going back to using SPEntryPage().getLoginURL()



This is the code for getLoginURL() function.



getLoginURL: function() {


var session = gs.getSession();


var nt = session.getProperty("nav_to");


var sPage = session.getProperty("starting_page");


if (nt == "welcome.do")


session.clearProperty("nav_to");



if (!sPage && !nt)


session.putProperty("starting_page", gs.getProperty("glide.login.home"));



if(sPage != "side_door.do?"){


return this.portal;


}



},





Dont forget to update the Sys Property glide.entry.page.script to define your getLoginURL function, you refer to this page to do that.


Please don't use UI Scripts... just refering to the post above. and I see you found the way as well. There is also a property you can set so the end user cant just change the URL later and get into the normal UI


Can read about it here: Redirect end users to portal



And for those who want to see more about the SPEntryPage etc.: Redirect End users to different portals