Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exit() - Close Tab - Redirects to dynamics

The exit function with boolean parameters works fine.

But is there a way where Exit() can close the tab.

Right now it redirects to


Any ideas?





Hi@GrischkePro , I totally forgot. Sorry for that. I still need to create the PoC and make it available for download. I noticed that the app I created it for still works. So it's old behavior should be the same. I hope to find some time this weekend. @

Hi @GrischkePro , I created a small proof of concept (see attachment) and this works fine for me. It contains a single screen with a single button which closes the current window when clicked. So if this doesn't work for you, something else should be causing the strange behavior. Maybe some browser extension? Or enforced corporate policies?

@mdocter thanks for looking into this for me. I think it’s my “close window” script that might be the problem. What’s the script that you’re using?

@mdocter I tried your test app and it works perfectly and I was applying the solution correctly in my app, but the close button will just not work. It opens a blank site with the JS code as it should but the tab won't close. It just stays open. I wonder if it's something to do with the size of my app, cache etc. Weird.

My HTML page is just a minimal HTML page with a script block in the HEAD.

The script block only contains:


window.opener = null;



This first line is probably missing in your code @GrischkePro 

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,363)