web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Deep Linking Trouble
Power Apps
Answered

Deep Linking Trouble

(0) ShareShare
ReportReport
Posted on by 716 Moderator

Apologies for creating yet another post on this subject but MS's instructions on learn.microsoft.com are a little lacking.

 

I have a problem at the very first step that I cannot figure out.

 

App OnStart:

 

 

Set(AppID, "86d39419-1d42-4371-a036-825d0d07f0ad");
If(Not(IsBlank(Param("surveyId"))),Set(surveyId,Param("surveyId")));

 

 

Which seems incredibly straightforward. The Edit properties area at the top of the page shows no errors in this code. (No red underlining) but the right hand flyout that shows all of the properties has a red X above OnStart. 

 

Starting the app and then stopping it to look at Variables on the left nav reveals that both AppID and surveyId are null. surveyId should be null at this point since it will be set either by the inbound url or when a user chooses a record on the browse page. But AppID should Set and it isn't.

Categories:
I have the same question (0)
  • DCHammer Profile Picture
    716 Moderator on at

    Well... weirdness abounds. Publishing the current WIP version and then running it once as a 'user' rather than Play from the Edit page now sets both of those variables correctly.

    If I had to guess, clicking Play in the Editor DOES NOT trigger the App OnStart event properly.

    Stay tuned. I may solve this on my own yet.

  • DCHammer Profile Picture
    716 Moderator on at

    Ok, I'm right at the finish line but could use some help generating the Sendto command.

    I don't want to use the O365 connector and want to use a basic Sendto and let the OS handle it.

    MS provided example is:

    Office365Outlook.SendEmailV2("Recipient", "Subject", "Here's the deep link to the selected account - https://apps.powerapps.com/play/{App ID}?accountId=" & accountVal.Account)

    Which would translate to:

    Office365Outlook.SendEmailV2("Recipient", "Subject", "Here's the deep link to the selected account - https://apps.powerapps.com/play/{AppID}?surveyId=" & surveyVal.ID)

    for this app.

    I converted to:

    Launch("mailto:recipient@example.com?subject=This%20is%20a%20test&body=Here%20is%20a%20link%20to%20a%20checklist:%20-%20https://apps.powerapps.com/play/{AppID}?surveyId=%20&surveyVal.ID")

    Which results in an email draft that looks like what I've attached.

    I can see that the problem is with the {AppID} because that is where it stops being interpreted as part of the link and switches to basic text. And it's showing the text for the variable rather than the content of the variable.

    I just have no clue how to solve.

    DCHammer_0-1697821484841.png

     

     

  • Verified answer
    DCHammer Profile Picture
    716 Moderator on at

    I fixed the url generation with this:

     

    Launch(
     Concatenate(
     "mailto:recipient@example.com?",
     "subject=IBC%20Presurvey",
     "&body=Here%20is%20a%20link%20to%20a%20PreSurvey: ",
     "https://apps.powerapps.com/play/",
     AppID,
     "?surveyId=",
     surveyVal.ID
     )
    )

     

    But it's not pulling the right record.

     

    I'm 99% sure the problem is in the DetailScreen1 OnVisible property which is this:

    If(Not(IsBlank(surveyId)), UpdateContext({surveyVal:LookUp('BusMarket - IBC PreSurvey', ID = Value(surveyId))}))

     

    But I don't understand what is wrong.

     

    surveyId is getting passed correctly through the url. I can see it there.

     

    Well, I solved it before I finished the reply. 🙂

     

    Shouldn't have used the Value of surveyId.

     

    If(Not(IsBlank(surveyId)), UpdateContext({surveyVal:LookUp('BusMarket - IBC PreSurvey', ID = surveyId)}))

     

    Once again, thanks for following along. 😄

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard