How can I get the page a user is on in the Service Portal?

Blair5
Tera Guru

I have a global business rule that should only run if the user isn't on a certain page (record producer) within the Service Portal. The old function used on our CMS doesn't get enough information (gs.action.getGlideURI().getMap().toString();). How can I get the information I need?

1 ACCEPTED SOLUTION

Blair5
Tera Guru

Found the answer from HI! Add below to your business rule to get the URL of the current page



var referer = GlideTransaction.get().getRequest().getHeader("referer");
gs.log("BR: referer = " + referer+ ".");


View solution in original post

15 REPLIES 15

Good afternoon,

 

Thank you so much for providing this information. I had asked a similar question on a separate post and happened across your answer here!!

 

https://community.servicenow.com/community?id=community_question&sys_id=4b196345dbe2fb801cd8a345ca96...

 

Have a great rest of your day.