Notifications

927 views

Description

To conditionally redirect a user to Service Portal after login, setting the system property glide.entry.first.page.script = "new SPEntryPage().getFirstPageURL()" works for a user with no roles. However, once redirected to Service Portal, if the url suffix is removed, the user gets stuck on a welcome.do page unless the Service Portal url suffix is manually added.

Steps to Reproduce

 

  1. Create a system property with the following values:
    • Name: glide.entry.first.page.script
    • Value: new SPEntryPage().getFirstPageURL()

    For more information, see the product documentation topic Add a property.

  2. Log into https://<>.service-now.com.

  3. Impersonate a user.

    The browser redirects to https://<instance>.service-now.com/sp.

  4. Remove the "sp" from the URL and press Enter.

    Instead of redirecting to https://<instance>.service-now.com/sp, the browser redirects to https://<instance>.service-now.com/welcome.do.

Workaround

Import the attached script include sys_script_include_3647c37253221200b0b0547cedc587fd. The following snippet is the script that will replace lines 81 to 85 in SPEntryPage (Script Include):

var ep = gs.getProperty("glide.login.home");
if (nt) {
if (ep == nt)
nt = null;
}
// PRB726860: if page is still welcome.do, go to glide.login.home preserving frameset
if (nt == "welcome.do") {
session.putProperty("nav_to", ep);
return;
}

Related Problem: PRB726860

Seen In

Helsinki Patch 1
Helsinki Patch 4

Fixed In

Istanbul Patch 8
Jakarta

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-02-26 02:31:25
Published:2017-08-01
sys_script_include_3647c37253221200b0b0547cedc587fd.xml