How reload form if the UI Page is closed through the "X" close button.

Jaswinder Kaur
Tera Contributor

Hi All,

 

I have a requirement to reload the form if we are closing the UI Page through "X" close button present on UI Page.

 

JaswinderKaur_0-1701863666877.png

 

The highlighted "X" button is the close button on the UI Page, how can we detect if the UI Page is getting closed through the OOB "X" close button and then I can write a code to reload the form.

 

Please suggest how to achieve this.

 

Thanks,

Jaswinder Kaur

2 REPLIES 2

Shruti Khaire
Kilo Sage

Hello @Jaswinder Kaur,

 

I have worked on similar requirement please try this below code
UI Page client script code:

window.opener.location.reload();

window.close();


Now after hitting save on my form that pops up in a new window, it quickly redirects to that UI Page, which closes itself and reloads the parent window!

 

Hope that helps, thank you!

svani
Tera Contributor

Hi @Jaswinder Kaur ,

 

Did you happen to achieve this, i have teh same requirement to reload the form once then close the ui page.

 

thanks,

Svani