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 not working
Power Apps
Unanswered

Deep linking not working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to send an email of a link to a specific item when it is created. This is in my on start - et(varReqID,Value(Param("TestID"))); If(varReqID <>0, Set(varRecord,LookUp('OSC CR', ID = varReqID));Navigate(DetailsScreen)). This is the button for the form the user submits - ffice365Outlook.SendEmailV2("email", "Sub", "<a href='https://apps.powerapps.com/play/a8571e60-77bc-462d-8ecd-a3be7d6eb8ea?tenantId=5dbf1add-202a-4b8d-815b-bf0fb024e033&TestID=" & varRecord.ID & "'> CR link</a> "); SubmitForm(Form1); . 
The problem is that the gallery I have on a different screen doesn't update in time, so it sends an email to the user like this https://apps.powerapps.com/play/a8571e60-77bc-462d-8ecd-a3be7d6eb8ea?tenantId=5dbf1add-202a-4b8d-815b-bf0fb024e033&TestID=. The specific TestID number is missing, but if I go in the gallery and resubmit it, then it works. The user wont have access to the gallery it's just in the backend to pull the ID to email to the user. How can I get the gallery to update faster so the full link including the TestID sends to the user.

Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    I have a confusion that why is the Test ID related to the Gallery? From the code above, I just find the Test ID is from the varRecord which is retrieved from 'OSC CR'.

    Could you please elaborate more about your scenario to help us understand your issue. If the user don't have access to the gallery, how do you want the user get Test ID from gallery?

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Because varRecord is the entire gallery. The TestID is the unique identifier. When the person opens up the email I want it to take them to the specific form the user submitted, not the gallery. @v-siky-msft test id=2 for example needs to be in the URL for this to happen, but the link is not sending correctly, it is sending without the testID @v-siky-msft 

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Sending mail and having visitors access form through links should be two different phases. From my view, I think you missed assignment of  varRecord variable before sending the email. Before sending an email, you should set the current selection as varRecord variable when selecting item in the gallery.

     

    Gallery.OnSelect: Set(varRecord, ThisItem)

     

    Hope this helps.

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft I already have that. Now the number is sending with the link, but it's the same number every time. Now when I go into the gallery it shows the correct ID, but I need the email link to send with the correct ID. 

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

     

    Each time you want change the items id, you must go to gallery to select the item first and then send the email. 

    Do you mean the assignment of varRecord.ID is correct, but variable doesn't work in the Email body, right?

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I think? Because when I submit the form it goes into the gallery correctly with the correct ID. But I have tried altering the initial link by using the datacardvalue of ID in the datasource and the  ID never changes it will always be the last ID I clicked in the gallery. What I want is simple I think. The user submits a form, it goes into the gallery, a link it sent to an email and when the email opens up that specific record opens up. @v-siky-msft  I am just not sure why sometimes it will send without a testID and sometimes the testID will not change. I will thinking I could do something like pull the last ID +1 in a datacard. Would this solve the issue and then on the button put that datacard value. @v-siky-msft 

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    So you want to the ID of last submitted item from From, right?

    I would suggest you put the following code to OnSuccess property of Form, this can save the last submitted record to the variable.

    Set(VarRecord, FormName.LastSubmit)

     Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This did not work. Would it be possible to use a lookup in the ID card and then add one to it? Then put that datacard in the link that is the only way I could think of it to work. What would the lookup be? @v-siky-msft 

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I'm not sure, but code could be like this?

    Set(varRecord,LookUp('SP list', ID= (Value(IDLabel.Text)+1)))

     

    Sik

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard