Agent Workspace: UI Action to Change Interceptor?

Community Alums
Not applicable

In Agent Workspace when we click Create Change Request, we would like to be brought to the Change Request Interceptor. 

find_real_file.png

This is the UI Action I have but nothing happens when I click Create Change Request from that menu. 

find_real_file.png

What do I need to change to get it to work? 

1 ACCEPTED SOLUTION

Here i have tested on my personal instance and working fine. 

 

find_real_file.png

 

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.

 

View solution in original post

19 REPLIES 19

Your script include is not set as client callable true , hence it has not worked. 

 

 

 

Community Alums
Not applicable

Ok here is the current UI Action 

 

find_real_file.png

and here is the current script include: 

find_real_file.png

But it's still not working 😞 

Am I supposed to have something in the 'onclick' and 'script' box of the UI Action? 

Script include has set client callable true but prototype is not correct. 

 

eg: see how client callable script include looks like 

 

find_real_file.png

 

 

 

Community Alums
Not applicable

OH, ok I have changed that, saved it, refreshed AW Interaction, and tried again but still, the UI Action doesn't bring me to the change interceptor 😕 

find_real_file.png

Is there somewhere else I should be checking for incorrect configurations? 

show me the ui action part as well, also instead adding screenshot, please paste the script