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);
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!
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.
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!
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
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.
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!
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1