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.

Catalog onSubmit close browser tab

SWills
Tera Expert

I am unable to close a browser tab from an onSubmit catalog client script. There are quite a few posts about this over the last few years, but I can't get any to close the tab. I currently have it working with setting a timeout function that successfully redirects the user. Changing the same redirect line to instead close the tab, none of the following attempts worked (Catalog running from Service Portal):
window.close();
top.window.close();
window.top.close();
window.open('','_self').close();

More background:
We have a client who wants to setup a kiosk where users will scan a QR code on their badge, that opens up a prefilled catalog item. Once the user submits, they just want it to close the tab, and be ready for the next user.

0 REPLIES 0