Stay in page after pressing 'Submit' button

RonAlmog
Tera Contributor

Hello, I'd like the 'Submit' button for new Change Requests to not redirect users to previous screen, rather redirect them to their new Change Request.

I found the UI Action of 'Submit' on table 'Global', I just don't want to mess it up by doing stuff I don't know.

 

Thank you!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@RonAlmog 

2 ways to handle

1) override the OOTB global submit button, visit that OOTB button URL, change the table to change_request and update the code in that button as this -> Do Insert and Stay on form header

URL: https://instanceName.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=42da42d00a0a0b340066377beb6dd099

AnkurBawiskar_1-1745838867906.png

 

 

answer = current.insert();
action.setRedirectURL(current);

OR Another way

2) Show Save button and inform users and they can use this and stay on current form after submitting

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @RonAlmog 

Also, if you don't want to bring the "Save" button, you can use the context menu. However, this would add extra clicks.

 

AGLearnNGrow_1-1745838597002.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@RonAlmog 

2 ways to handle

1) override the OOTB global submit button, visit that OOTB button URL, change the table to change_request and update the code in that button as this -> Do Insert and Stay on form header

URL: https://instanceName.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=42da42d00a0a0b340066377beb6dd099

AnkurBawiskar_1-1745838867906.png

 

 

answer = current.insert();
action.setRedirectURL(current);

OR Another way

2) Show Save button and inform users and they can use this and stay on current form after submitting

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @RonAlmog 

 

Is something wrong with my answer? This will increase technical debt in the system. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************