We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

getSession properties returning null

Gayatri3
Kilo Contributor

the following code of SPEntryPage script include is not working:

"var nt = session.getProperty("nav_to"); // I tried navpage too but didn't work
var redirectURL = session.getProperty("login_redirect");"

 

nt and redirectURL is returning null. This is the reason why my SPEny page is not working.

 

Any idea why and how I can correct it?

2 REPLIES 2

Saiganeshraja
Kilo Sage

Can you check var session = gs.getSession(); is present or not in script.

s_proskin
Tera Contributor

Did you ever find a solution to this?  We're facing the same issue where all the session properties around redirect and nav_to are null when logging into a Service Portal page that should be redirected.