cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

prevent action when error is raised

Currently I'm sending mails from my app using the Office365.SendEmail function. When users press a button, a mail is sent and they get navigated to a success screen. 

However, sometimes the server returns a connection error, or the device loses connection to the internet and no email is sent, however the users still get navigated to the success page in this case.

 

Is there a way to not navigate users to the success page when any error occurs?

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @Anonymous,

 

You could workaround this by writing an if condition to check the connection status, if the connection is not good, then choose to navigate to a predefined screen tolding that there is a problem when sending the Email.

If( connection.connected&&Office365.testconnection(),
   Office365.SendEmail();Navigate(SuccessScreen,fade),
   Navigate(failedScreen, fade)

 

Things that you need to know is that currently under PowerApps, there is no error handling mechanism for the Office 365 related service, which means currenlty we have no workarounds to define actions based on the Office 365 Send an Email function status.

Connect to Office 365 Outlook from PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @Anonymous,

 

You could workaround this by writing an if condition to check the connection status, if the connection is not good, then choose to navigate to a predefined screen tolding that there is a problem when sending the Email.

If( connection.connected&&Office365.testconnection(),
   Office365.SendEmail();Navigate(SuccessScreen,fade),
   Navigate(failedScreen, fade)

 

Things that you need to know is that currently under PowerApps, there is no error handling mechanism for the Office 365 related service, which means currenlty we have no workarounds to define actions based on the Office 365 Send an Email function status.

Connect to Office 365 Outlook from PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (26,021)