The Zurich release has arrived! Interested in new features and functionalities? Click here for more

UI Action URL Navigation

qz8437
Mega Contributor

I know this has to be really easy, but I don't know how:

In my UI Action script I'm doing a "action.setRedirectURL('<URL literal>');" and it works fine - it takes the user where I want them to go. But when they finish on the new page and navigate back they skip over the previous page (with the UI Action) go back one page farther. So I just want my UI Action to navigate to the URL instead of redirecting there. What method/syntax would I use?

Thanks,

Reed

1 ACCEPTED SOLUTION

You can apply it right to your action.setRedirectURL. If I were going to send my users to a specific form and want them to go to the home page when they are done, it might look like this:



var url = '/u_my_table.do?sys_id=' + some_sys_id_variable + '&sysparm_stack=home.do'


action.setRedirectURL(url);


View solution in original post

7 REPLIES 7

Chuck Tomasi
Tera Patron

Hi Reed,



You may be interested in the sysparm_stack parameter.



http://wiki.servicenow.com/index.php?title=Navigation_Stack#gsc.tab=0


Thanks Chuck, Yes, I am interested - and I looked at that before but I couldn't tell from the wiki article how I could apply it to my situation (I didn't want to go through 50 rounds of trial-and-error only to find out it doesn't do what I want).



Would I just include that parm in the URL in my setRedirectURL? Or would I have to do it in another statement prior to issuing my setRedirectURL?



Thanks,


Reed


You can apply it right to your action.setRedirectURL. If I were going to send my users to a specific form and want them to go to the home page when they are done, it might look like this:



var url = '/u_my_table.do?sys_id=' + some_sys_id_variable + '&sysparm_stack=home.do'


action.setRedirectURL(url);


Thanks Chuck,


That does what I want. Your example was very helpful.