UI Builder client handler how pass url

armanoj
Mega Sage

Hi team,

 

I want pass url in UI Builder client handler.
when hardcoded its redirecting but there multiple upper instance UAT, Prod , it is not proper to hardcode. please suggest a solution call url of current instace to 
UI Builder client handler

6 REPLIES 6

Ehab Pilloor
Giga Sage

Hi @armanoj,

 

Try using the property 'glide.servlet.uri'. It is an internal property that stores url of the instance. That way you dont have to hardcode it.

 

glide.servlet.uri is a core system property in ServiceNow that stores the base URL of the instance (e.g., https://service-now.com).

 

Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.

 

Kind Regards,

Ehab Pilloor

not readable in this

@armanoj,

 

Adding a reference to how you can use system property in ui builder client script.

https://www.servicenow.com/community/developer-forum/ui-builder-how-can-i-get-a-property-value-from-...

https://www.servicenow.com/community/developer-forum/get-instance-url-via-ui-builder/m-p/2735950

 

Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.

 

Kind Regards,

Ehab Pilloor

Dinesh Chilaka
Kilo Sage

Hi @armanoj ,

Can you share how are you passing the URL now in Client Script?

 

Thanks,

Dinesh