Get Instance URL the user is using in servser-side script (email script)

Richard Tamparo
Mega Guru

The instance that I am currently working on has 2 url. Meaning the instance can be accessed in 2 ways. The one set in the "glide.servlet.uri" system property and another domain.

 

I want to get which url the current user is using and I have been searching for an hour now but could not find the answer I am looking for. Maybe you guys can help me on this. Please help.

 

gs.getProperty('instance_name'); cant be used as a condition since basically the 2 domains is accessing the same instance so I do not know what to do.

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Is there somewhere stored which domains there are and which a user is allowed/able to use? Or can a user choose that themselves?

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

we can choose which url to use. That is why this [gs.getProperty("glide.servlet.uri");] one did not worked on the other domain. 

Richard Tamparo
Mega Guru

Please help guys

KP28
Tera Guru

Hello,

 

If OP is still looking for the answer, the answer in this post helped me

https://www.servicenow.com/community/itsm-forum/how-do-i-get-the-referring-url-within-a-business-rul...