Mastering Deep Linking in Power Apps: A Step-by-Step Guide

Hey there, Power Apps enthusiasts! Ever found yourself wishing you could send someone a direct link to a specific record in your Power Apps application? Well, today is your lucky day. In this blog post, you’re going to learn the ins and outs of setting up deep linking in Power Apps, specifically with Dataverse. By the end of this read, you’ll be a deep linking wizard. 🧙‍♂️

What is Deep Linking in Power Apps?

Deep linking in Power Apps is a technique that allows you to create URLs that point directly to a specific, generally “deep” location within your app. Instead of sending someone to the home screen, you can send them straight to the information they need. It’s like having a VIP pass to the best parts of your app!

While we will demo sending deep links via an Outlook email reminder once you understand how to create the URL, you can distribute them any way you want. Via Teams, Power BI, Power Automate, even embedded in a SharePoint List

Why Dataverse?

Dataverse is a powerful data service provided by Microsoft that integrates seamlessly with Power Apps. It offers robust capabilities, including the ability to create primary keys for your records, which is crucial for deep linking.

Does it work with SharePoint or SQL?

Yes, this works for any of your tabular data sources including SharePoint Online and Azure SQL Server for example. The key is your data source needs a primary key that you can reference and then you need to Lookup that record. I only used Dataverse because it is the easiest data source for me to make the app and tables downloadable via out Training subscriptions.

Let’s Get Started

Step 1: Identify the Primary Key in Dataverse

The first thing you need to do is identify the primary key in your Dataverse table. This unique identifier is what you’ll use to create your deep link. To find it, go to your Dataverse table and look for the column labeled as the “unique identifier.”

Step 2: Craft Your URL

Once you have your primary key, you can start crafting your URL. The URL will look something like this:

https://apps.powerapps.com/play/YOUR_APP_ID?tenantId=YOUR_TENANT_ID&empID=PRIMARY_KEY

Replace YOUR_APP_ID, YOUR_TENANT_ID, and PRIMARY_KEY with your specific details. Remember to get everything before &empID=PRIMARY_KEY you can go to Power Apps, click Apps, find your app and then click Details. You want the Web link.

Deep Linking Demo

Step 3: Use the OnStart Property

In your Power Apps app, go to the App object and find the OnStart property. Here, you’ll set a variable to capture the primary key from the URL using the Param function.

PowerApps
Set(varEmpID, Param("empID"))

Step 4: Navigate to the Record

Now, you’ll use the Navigate function to go to the specific screen where the record is displayed. You’ll use the Lookup function to find the record that matches the primary key.

PowerApps
Navigate(EditScreen, Lookup(YourTable, PrimaryKeyColumn = varEmpID))

Replace EditScreen, YourTable, and PrimaryKeyColumn with your specific details.

Step 5: Test It Out

The last step is to test your deep link. Send the URL via email, click on it, and you should be taken directly to the specific record in your Power Apps app.

Watch the Video Tutorial

For a more detailed walkthrough, including some pro tips and tricks, check out this video tutorial: Master Power Apps Deep Linking with Dataverse

Need Help?

Setting up deep linking can be a bit tricky, but the benefits are huge. If you find yourself stuck or just want to take your Power Apps skills to the next level, PowerApps911 is here to help. Just scroll down the page and tell us how we can help you via the Contact form.

If you prefer to learn on your own, there is a downloadable app included with this video in our YouTube training library for only $15/month!

About the Author

Shane Young has been a Microsoft MVP since 2005 and was named one of the first Power Apps and Flow MVPs. Microsoft has awarded him this for his work speaking at major conferences on their behalf, contributions to their training and documentation, and for his YouTube channel that has over 19 million views for teaching people Microsoft technologies. He uses his strong relationship with the Power Apps and Power Automate product teams at Microsoft to provide his clients the best, most up-to-date information, and techniques for their apps. Shane has consulted on apps across the globe, with Antarctica being the only continent not covered. So if you know anyone who needs a polar bear app, please let him know. When Shane is not teaching or consulting, you can find him chasing his very active children all over the city of Cincinnati.

References

Young, S. (2023). Mastering Deep Linking in Power Apps: A Step-by-Step Guide, Available at: https://www.powerapps911.com/post/mastering-deep-linking-in-power-apps-a-step-by-step-guide [Accessed: 25th March 2024].

Share this on...

Rate this Post:

Share: