The CreatorCon Call for Content is officially open! Get started here.

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

I'm glad you got your question answered. Thank you for participating in the community.


alvinbm1
Tera Expert

Reed,


  Which application are you using in Service Now, and what is the use case for the redirecting the user to another page?


qz8437
Mega Contributor

Custom application. It is an automated form that was previously a paper form submitted via fax or scanned and emailed. It is now a record producer that creates table records to hold the information. There is a workflow that handles 2 levels of approvals - once fully approved an HR Case is auto-created by mining the data from the custom table (which is not an extension of task). My redirect is from the approval record to the data record being approved. It allows the approving manager to make any necessary changes, add notes, etc. before approving. Now with this change, when they update the record or click the back button, they return to the approval record instead of the My Approvals List.