gs.getProperty('glide.servlet.uri') is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 12:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 04:05 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 05:40 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 03:01 AM
Hi,
You found any solution on this? we are also facing this after upgrading our instance to Xanadu Patch 3
Thanks
Surabhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2024 03:58 AM
Hi @Kartik Magadum ,
It should work fine, share your code where you have written this.
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------