How to achieve dynamic instance URL to available via variable in service catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 09:15 AM
Hi Team,
I have a variable in my catalog, when I click on it, I need to redirect to some table in the current instance. I knew we can achieve this via property called glide.servlet.ui but how to use it in variable? Can anyone share your ideas or suggestions or references?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 10:18 AM - edited 07-21-2024 10:24 AM
Hi @Priya Reddy I , Hopefully that is a URL type variable.
In case if catalog client scripts, you can try the below:
this.location.href
this.location.origin
https://servicenowguru.com/client-scripts-scripting/parse-url-parameters-client-script/
OR, try the approach provided here and set the field value by onload or onchange client script
https://www.servicenow.com/community/itsm-forum/how-to-get-system-property-at-client-side/m-p/457070
Mark this as Helpful / Accept the Solution if this helps.