We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Force Reload Without Confirmation

Wasdom_Kung
Tera Guru

Hello!

 

 


I have created a client script that when an item is submitted/added to cart, will reload the current page, however I noticed that the browser will had a reload/cancel popup.

 

Is there a way to force this refresh without input from a user?

 

This is using the following line: 

location.reload(true);

 

5 REPLIES 5

Runjay Patel
Giga Sage

Hi @Wasdom_Kung ,

 

Use below code in your client script.

g_form.modified = false;
 location.reload();

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Part 2. In this video i have talked about overview on ServiceNow platform/tool. How you can opt for personal dev instance (PDI)? how to login in ServiceNow instance and navigation to OOB modules. For document please visit: https://servicenowwithrunjay.com/ Follow Facebook page for latest update on