Skip to main content
Community site session details

Community site session details

Session Id : DuwyApEivXUb7vX8fHDkIh
Power Apps - Building Power Apps
Unanswered

Navigate not working in OnSelect when other code is present in Published app

Like (0) ShareShare
ReportReport
Posted on 18 Oct 2023 18:00:28 by 16

I have a button in my app that is supposed to Navigate to a screen, email a PDF of the screen, then Navigate back.  This works fine in make.powerapps but if I publish the app and try it in a browser or in a Teams window the Navigation does not work so the PDF fails.  If I remove all the code except Navigate, then it does navigate to the screen after publishing.  

 

The code in the OnSelect starts like this:

 

Navigate(AllData);

 

Office365Outlook.SharedMailboxSendEmailV2(etc ett etc);

 

Categories:
  • narayan225 Profile Picture
    2,513 Super User 2025 Season 1 on 13 Nov 2023 at 01:32:56
    Re: Navigate not working in OnSelect when other code is present in Published app

    @rdefronzo 

     

    Are you testing the app from both make.powerapps.com and from teams app using the same account?

     

    Also, did you try using the IFERROR function?

     

    You can try like this:

    IfError(Navigate(AllData);Office365Outlook.SharedMailboxSendEmailV2(data),Notify("Unexpected Error Occurred. Please try again.",NotificationType.Error));Back();

     

    Let me know how it goes.

    Cheers!

  • rdefronzo Profile Picture
    16 on 09 Nov 2023 at 14:33:27
    Re: Navigate not working in OnSelect when other code is present in Published app

    Just to follow up on this. I was never able to figure this out,  I even rebuilt the app from scratch (for other reasons).  Seems like the Navigate step would not work in cases where I had the new PDF function included in the OnSelect of the button.  If I removed that function it worked fine.  No idea why, but I decided to leave that part out of the app. 

  • narayan225 Profile Picture
    2,513 Super User 2025 Season 1 on 22 Oct 2023 at 22:59:51
    Re: Navigate not working in OnSelect when other code is present in Published app

    @rdefronzo 

     

    If it is working without rest of the code, it could be that the rest of the code is not working properly. You can put a condition with IFERROR() - Error, IfError, IsError, and IsBlankOrError functions in Power Apps - Power Platform | Microsoft Learn to check if your code is running error and use NOTIFY() along with it to find the issue.

     

    Hope this makes sense.

    Cheers!

  • cdwhite Profile Picture
    1,067 Most Valuable Professional on 20 Oct 2023 at 12:49:54
    Re: Navigate not working in OnSelect when other code is present in Published app

    It might be a tough one to debug without seeing the events from browser or device. 

    Have you tried launching Monitor, then running the app in play mode to see any potential outputs? Another step might be to put Notify() functions between each line of code to see where things are starting/failing.
    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net


  • rdefronzo Profile Picture
    16 on 20 Oct 2023 at 12:20:29
    Re: Navigate not working in OnSelect when other code is present in Published app

    It does not navigate at all.  It stays on the main screen so the subsequent steps fail.  Like I said, If I remove all other code and just run with a Navigate it does move to the screen.  

  • narayan225 Profile Picture
    2,513 Super User 2025 Season 1 on 20 Oct 2023 at 03:34:05
    Re: Navigate not working in OnSelect when other code is present in Published app

    @rdefronzo 

     

    When you run in the browser, does it not navigate to the next screen at all or does it navigate and then doesn't navigate back?

    It could be the flow that is taking some time to run and is causing the app to navigate you back to the main screen.

     

    Cheers!

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1