The CreatorCon Call for Content is officially open! Get started here.

How to achieve dynamic instance URL to available via variable in service catalog

Priya Reddy I
Tera Contributor

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?

1 REPLY 1

SN_Learn
Kilo Patron
Kilo Patron

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.