Deep Linking Into A Specific Screen On Mail Body In PowerApps

In this article I am going to explain how to provide a link which will help to navigate a specific screen of your application in PowerApps from email body.

Introduction

In this article I am going to explain how to provide a link which will help to navigate a specific screen of your application from the email body   in PowerApps.

 Overview
  • Pass the item id along with the app link to display the record from the link in the email body
  • Set a timer controller on landing screen, navigate to a predesigned screen after a specific duration of the timer with the passed id
  • Query the item details with help of passed ID and display it in the screen

Create a PowerApp for Desired List

I created a SampleList here with the following 2 columns and data: (When you Exit Classic Experience you will get the options like Flow, PowerApps as below),

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Create an app, named As AppForDeeplinking

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Now duplicate the DetailScreen1 and Rename as DetailScreenForSpecificID

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Let's do the actions as follows on the home screen:

  • Add a Timer Control and set Visible as False
  • Write the syntax on OnTimeEnd of the Timer Controller as below:

OnTimeEnd

  1. If(Not(IsBlank(Param("ItemId"))), Navigate(DetailScreenForSpecificID, Cover, {  
  2.     Samples: LookUp(SampleList, ID = Value(Param("ItemId")))  
  3. }))  

Where ItemId is a user defined parameter, DetailScreenForSpecificID is a predesigned screen to display the specified item, and SampleList is our list

  • Set the duration of the timer as fast as you want, let's set it as 6 as below,

    Duration-6
  • Set AutoStart as True as below,

    AutoStart - true

I have set those as mentioned above,

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Now come  to DetailScreenForSpecificID screen.

Click on DetailForm1_1 which is added by default when we duplicated the screen

Set the item with the Syntax First (Filter(SampleList, ID = Value(Param("ItemId"))))

Item

  1. First(Filter(SampleList, ID = Value(Param("ItemId"))))  

Where the SampleList is our list and ItemId is defined in home screen, the result is:

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Now publish the app and pass the link as formatted below in mail or anywhere else to click to navigate the specific item:

Syntax

https://web.powerapps.com/apps/{AppId}?{Parameter}={ItemId}

Where my app id is 9d7d3c39-90ca-4bd1-b2ed-cd658caeda96

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Let's say I want to display the item number as 1, so the resulting URL is as below

https://web.powerapps.com/apps/9d7d3c39-90ca-4bd1-b2ed-cd658caeda96?ItemId=1

Where, ItemId is our defined parameter,

1 is Item Id which I wanted to display

9d7d3c39-90ca-4bd1-b2ed-cd658caeda96 is App Id

So when I pass the above Url on a button click in email body it will show the item number 1 details as below,

Deep Linking Into A Specific Screen On Mail Body In PowerApps 

Hence, we have done the deep linking to navigate a specific screen to display the specified item.

Conclusion

This article will help us to set the link in email bodies which will navigate to the specific screen where the specified item is displayed. You can pass the ID dynamically with the help of flows to emails.

Thank you.