- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 08:19 AM
I have a scripted URL as the following:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 05:44 PM
Hi @chrisshellhamme - Try like this:
var service = grTS.getValue('cmdb_ci_service');
var baseUrl = window.location.protocol + '//' + window.location.host + '/rm_story_list.do?sysparm_query=';
var query = 'cmdb_ci=' + encodeURIComponent(service) + '^active=true';
var url = baseUrl + encodeURIComponent(query);
window.open(url, '_blank', 'width=800,height=600');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 06:12 PM
Also, depending on where this script is implemented, you may be able to use just the relative path in the baseUrl:
var baseUrl = '/rm_story_list.do?sysparm_query=';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 05:40 AM
Hi @sheldondotswift
This worked! Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 08:29 PM
hi @chrisshellhamme ,
please try the below code:
var baseUrl = window.location.host + '/rm_story_list.do';
var query = 'cmdb_ci=' + encodeURIComponent(grTS.cmdb_ci_service) + '^active=true';
var url = baseUrl + '?sysparm_query=' + encodeURIComponent(query);
window.open(url, '_blank', 'width=800,height=600');