web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : quBElqmtU61Uhhi6Ju4dVn
Power Apps - Building Power Apps
Answered

Exit() - Close Tab - Redirects to dynamics

Like (1) ShareShare
ReportReport
Posted on 15 Oct 2019 16:04:05 by

The exit function with boolean parameters works fine.

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

Right now it redirects to home.dynamics.com

 

Any ideas?

 

Thanks,

S.

Categories:
  • chico Profile Picture
    636 on 04 May 2023 at 21:38:04
    Re: Exit() - Close Tab - Redirects to dynamics
    Launch("https://your.redirect.link", Blank(), LaunchTarget.Replace) 

     

    @ron_zw  as of May 2023, this one still works!!!

  • mdocter Profile Picture
    22 on 26 Sep 2021 at 07:45:38
    Re: Exit() - Close Tab - Redirects to dynamics

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

    The script block only contains:

     

    window.opener = null;

    window.close();

     

    This first line is probably missing in your code @GrischkePro 

  • GrischkePro Profile Picture
    285 on 24 Sep 2021 at 22:00:16
    Re: Exit() - Close Tab - Redirects to dynamics

    @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.

  • GrischkePro Profile Picture
    285 on 22 Sep 2021 at 06:27:32
    Re: Exit() - Close Tab - Redirects to dynamics

    @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 Profile Picture
    22 on 21 Sep 2021 at 19:15:28
    Re: Exit() - Close Tab - Redirects to dynamics

    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 Profile Picture
    22 on 17 Sep 2021 at 21:44:32
    Re: Exit() - Close Tab - Redirects to dynamics

    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. @

  • GrischkePro Profile Picture
    285 on 17 Sep 2021 at 16:56:22
    Re: Exit() - Close Tab - Redirects to dynamics

    @mdocter 

    Hey, did you manage to have a look at this for me?

  • mdocter Profile Picture
    22 on 16 Aug 2021 at 06:44:38
    Re: Exit() - Close Tab - Redirects to dynamics

    Hi @GrischkePro, I'm on a holiday, so can't test right now. Maybe there was a change in the runtime? Next week, when I'm back online, I'll make a small proof of concept app to validate it's old behavior. Sorry I can't help you sooner.

  • GrischkePro Profile Picture
    285 on 15 Aug 2021 at 22:53:31
    Re: Exit() - Close Tab - Redirects to dynamics

    @Maarten_Docter this doesn't seem to work for me 😞

    While editing the app, the close button opens and closes a new window, but when published, it opens a blank page. I tried your URL and my URL. When I open the URL in a new window, it works. It doesn't work in the same window 😕

    Any ideas?

  • ron_zw Profile Picture
    39 on 31 Mar 2021 at 07:18:59
    Re: Exit() - Close Tab - Redirects to dynamics

    Hi @Anonymous 

     

    Exit(false) didn't really work for me. But this work for me.

     

    Launch('https://your.redirect.link", Blank(), LaunchTarget.Replace) 

     

    Regards

     

    Ron

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete