- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 02:45 PM
In Agent Workspace when we click Create Change Request, we would like to be brought to the Change Request Interceptor.
This is the UI Action I have but nothing happens when I click Create Change Request from that menu.
What do I need to change to get it to work?
Solved! Go to Solution.
- Labels:
-
Agent Workspace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 05:08 PM
Here i have tested on my personal instance and working fine.
Script include:
var getUrlSio = Class.create();
getUrlSio.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
getURL: function(){
var id = gs.getProperty("glide.servlet.uri");
var url = id+'wizard_view.do?sys_target=&sysparm_wizardAction=sysverb_new&sysparm_parent=8db4a378c611227401b96457a060e0f4';
return url;
},
type: 'getUrlSio'
});
UI Action Script:
function onClick(g_form) {
alert('hey');
var ga = new GlideAjax('sn_itsm_workspace.getUrlSio');
ga.addParam('sysparm_name', 'getURL');
ga.getXML(HelloWorldParse);
function HelloWorldParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
//alert(answer);
var win = top.window.open(answer, '_blank');
win.focus();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 04:17 PM
function onClick(g_form) {
var ga = new GlideAjax('GetChangeURL');
ga.addParam('sysparm_name', 'getURL');
ga.getXML(GetInstanceURLParse);
function GetInstanceURLParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
var win = top.window.open(answer, "_blank");
win.focus();
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 04:18 PM
try now, and let me know what are you getting in alert?
function onClick(g_form) {
var ga = new GlideAjax('GetChangeURL');
ga.addParam('sysparm_name', 'getURL');
ga.getXML(GetInstanceURLParse);
function GetInstanceURLParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert('Community Test by Harsh '+ answer );
var win = top.window.open(answer, "_blank");
win.focus();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 04:46 PM
Ok I added that line and saved it. Now when I click 'Create Change Request' I get no alert. Nothing happens at all.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 05:08 PM
Here i have tested on my personal instance and working fine.
Script include:
var getUrlSio = Class.create();
getUrlSio.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
getURL: function(){
var id = gs.getProperty("glide.servlet.uri");
var url = id+'wizard_view.do?sys_target=&sysparm_wizardAction=sysverb_new&sysparm_parent=8db4a378c611227401b96457a060e0f4';
return url;
},
type: 'getUrlSio'
});
UI Action Script:
function onClick(g_form) {
alert('hey');
var ga = new GlideAjax('sn_itsm_workspace.getUrlSio');
ga.addParam('sysparm_name', 'getURL');
ga.getXML(HelloWorldParse);
function HelloWorldParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
//alert(answer);
var win = top.window.open(answer, '_blank');
win.focus();
}
}
If my answer helped you, kindly mark it as correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 05:46 PM
I finally got it working by changing one thing - making the script include global instead of scoped. Thank you for all of your help and patience!
If my answer helped you, kindly mark it as correct and helpful.