Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

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

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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