gs.getProperty('glide.servlet.uri') is not working

Kartik Magadum
Kilo Sage

Hello all

I used gs.getProperty('glide.servlet.uri') in one of my script and it's not working as expected, it's returning like: 

https://<instance-name>/not_found.do?page_url=https://<instance-name>/

 

And we are observing this issue after upgrading to Xanadu. 

 

also pls refer the script:

var sys_id = current.sys_id;

var url = gs.getProperty('glide.servlet.uri')  + "<table-name>?sys_id="+ current.u_return_no + "&sysparm_record_target=<table-name>&sysparm_record_list=";

action.setRedirectURL(url);
action.setReturnURL(current);

//table-name - actual table name

 

Any assistance in resolving the issue would be greatly appreciated. 

Thanks and Regards

Kartik Magadum

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Kartik Magadum 

If it was working fine then it's a platform bug. Did you try running background script and see what value came?

As an alternative try to use gs.getProperty('instance_name') to get instance name and then form the url

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Kartik Magadum 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Surabhi7
Tera Contributor

Hi,

 

You found any solution on this? we are also facing this after upgrading our instance to Xanadu Patch 3

 

Thanks

Surabhi

Runjay Patel
Giga Sage

Hi @Kartik Magadum ,

 

It should work fine, share your code where you have written this.

RunjayPatel_0-1735214313396.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------