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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2023 08:10 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2023 09:26 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2023 09:58 PM
we can choose which url to use. That is why this [gs.getProperty("glide.servlet.uri");] one did not worked on the other domain.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2023 07:37 PM
Please help guys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 12:45 AM
Hello,
If OP is still looking for the answer, the answer in this post helped me