UI action not redirecting to current page

Sagar24
Tera Contributor

I have a UI action and it is calling a UI page on the onClick but the UI action is not redirect to current, it is redirecting something else I have tried gsftSubmit but couldn't help. Below is the screenshot of the UI action script

find_real_file.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Since you are calling the UI page you can make the UI action only client side and don't use server side code

Inside the UI page processing script you know the record sysId; you can redirect from processing script itself

something like this in processing script

var urlOnStack = gs.getSession().getUrlOnStack();

response.sendRedirect(urlOnStack);

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

It didn't work. Am I doing it correctly?

find_real_file.png

Hi,

line 1 is not required.

I hope you are using g:ui_form to submit the form then only processing script would run

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sajilal
Mega Sage

Seems to be a similar problem addressed here: LINK


Please mark helpful/correct if it helped resolve your query.

Thanks,
Saji