Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

URGENT!!! Save the form when the pop up closed by the user

sunilsafare
Mega Guru

Hi Experts,

I have a requirement where I am calling a UI page to perform some action on the form. First the user opens the form, modify the data and click on the ui action, there I am calling a ui page which displays a pop up to perform some action. If user close the pop up without performing the action by clicking the (X) button(the X button will be there for pop up window), then the data on the form should be saved automatically without clicking on the ui action again. I am stuck how to find the control that user has clicked on X button to perform save operation.

Thanks in advance!

Regards,

Sunil Safare.

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

I had this in one of the UI pages that I had designed. This will call some function when the close icon of the popup window is clicked. Add it on your UI page.



document.getElementById('popup_close_image').onclick = function() {submitForm();};


View solution in original post

12 REPLIES 12

This is the syntax to destroy the page


GlideDialogWindow.get().destroy();


Pradeep has mentioned that earlier in the thread.


I have modified the way as the above line. Still its not disappearing



Thanks and Regards,


Sunil Safare.


can you replicate this in any instance?


Hi Kalai,



I have created a UI page in demo007.service-now.com and testing it by clicking on Try it.


It is reproducible.



UI page: my_ui_page



Looking forward for your help



Thanks and Regards,


Sunil Safare


Where are you calling it ? In which UI action?