- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014 04:05 PM
I'm trying to open a wizard from a UI Action, and it's not working. From what I've read on the wiki, it looks like I should be using action.setRedirectURL with the url as the url of the wizard:
function new_request_message() {
alert('clicked');
action.setRedirectURL('expert_shell.do?sysparm_sys_id=4f0a1b3538f695002ae704ffa136f274&sysparm_initial=true&sysparm_view=wizard');
alert('done');
}
I've added the alerts just for debugging. If I comment out the action.setRedirectURL line, I get both alerts. With that uncommented, I only get the first. In either case, I don't get a new window or anything at all opening up when I click the button. I copied the syntax from the 'Test' UI action on the 'expert' table, but I'm clearly missing something.
Any help?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2014 07:52 AM
action.setRedirectURL() is a server side function, but alert() is a client side function, so if alert() is working you're probably running the ui action client side. In that case you can just use the standard window.location to redirect to the wizard.
function new_request_message() {
alert('clicked');
window.location = 'expert_shell.do?sysparm_sys_id=4f0a1b3538f695002ae704ffa136f274&sysparm_initial=true&sysparm_view=wizard';
alert('done');
}
You could also convert this to a server side ui action to use action.setRedirectURL().

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2014 07:52 AM
action.setRedirectURL() is a server side function, but alert() is a client side function, so if alert() is working you're probably running the ui action client side. In that case you can just use the standard window.location to redirect to the wizard.
function new_request_message() {
alert('clicked');
window.location = 'expert_shell.do?sysparm_sys_id=4f0a1b3538f695002ae704ffa136f274&sysparm_initial=true&sysparm_view=wizard';
alert('done');
}
You could also convert this to a server side ui action to use action.setRedirectURL().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014 09:55 AM
Thanks! That worked.
Thanks,
Ron Legters
System Administrator
Univar
T +1 425 889 3952
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2018 05:07 AM
Hello brad,
I have tried using window.location but it is giving error as "Server Javascript error 'window' is not defined".
Kindly suggest alternatives.
Thanks,
Smruti