Using Exit features in Canvas Application.

Hello Guys,

In our previous blog we have seen how to send a notification in canvas application when an opportunity is won using Microsoft Flow. Today we will see how to implement Exit Features in Canvas Power apps.



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

While using a canvas application through a device like Phone or Tab we have faced issue like closing the current app and starting a new app from the apps gallery. For example consider a scenario where we are using Power Apps for mobile application. When we login to Power apps for mobile application we see below interface.


Now suppose we are opening the first app i.e. Opportunity Viewer. It will open the below app.

As you can see in above image we don't have any Exit icon. In this scenario we are not able to close the application. To close the application we need to kill thread of the apps by closing all the apps.

Also there is a situation where you want to exit and logout from the power apps entirely. To overcome this issue we have Exit() method in Canvas application.

Let's see how to implement it. We will be working with Opportunity Viewer canvas application which we made in our previous blog.

Here from the menu click on Insert and from the icons select cancel icon. Set the icon as shown below and select the icon and set it's OnSelect event and write formula for it as shown.



Save the changes and publish the app. Open the app in mobile device and check the functionality working as expected.



Now we want when user clicks on cancel icon, User should logout from the Power apps. Also a prompt should be there for user's confirmation.

To do so just use Exit(true) instead of Exit()

Also select the apps in Screens and configure it as shown.



Save the changes and publish the app.







Hope it helps...



Comments

Popular posts from this blog

Read Only Sub Grid & Editable Sub grid in Dynamics 365

Understanding Sales Process in D365.

Understanding Business Unit in Dynamics 365.