Skip to main content

Notifications

Community site session details

Community site session details

Session Id : FsIMDuf8u+vINDXvcMWzD1
Power Apps - Building Power Apps
Answered

Deep Link to Record

Like (0) ShareShare
ReportReport
Posted on 9 Sep 2020 17:09:41 by

@PowerAddict 

 

Hello,

 

I am attempting to follow a tutorial by the great Shane Young on deep linking to a specific record, but am having trouble. I'm tagging Hardit, but would welcome help from anyone if he is otherwise occupied. 

 

Here is my OnStart formula:

Set(varProjectID, Value(Param("ProjectID")));If(varProjectID<>0, Set(varRecord, LookUp('Tool Design Support Requests',ID=varProjectID));Navigate('Edit Request Screen'))

 

Here is my gallery nav icon formula where the varRecord variable is set:

Set(varRecord,ThisItem);Navigate('Edit Request Screen',Transition.None)

 

And finally, here is the OnSuccess formula of my form which resides on the Edit Request Screen. The formula works in the sense that it sends the email with the proper formatting, but when the link is clicked it takes me to the home screen of the app versus the edit screen for the record. 

 

I have removed the actual GUID and Tenant ID references for the sake of confidentiality, but of course they are present in the app. This screen has 4 tabs/4 forms so I would love to deposit the user on the Designer tab if possible. Can you let me know if that is a possibility?

 

If(Not(varProjectStatus = varNewProjectStatus),
Office365Outlook.SendEmailV2(varUser.Email,"Tool Support Design Request: " & txtRequestTitle.Text & " project status has changed",
"The status of your tool design support request has changed to " & varNewProjectStatus & ". Here is a <a href='https://apps.powerapps.com/play/GUIDSTRING?tenantId=TENANTID&ProjectID=" & varRecord.ID & "'>link to the project</a>. Please take a look at your earliest convenience.",{Importance:"High"}))

 

The correct Project Name comes through in the email and the correct Project ID is in the url of the link (Chicken Coop SharePoint ID is 170) so I feel like I am close. I've attached screenshots of the email and url for your review. If you could help me get over the last hurdle, I would be very grateful. 

 

Kind regards,

Teresa

Categories:
  • godala_vamshi Profile Picture
    174 on 19 Apr 2021 at 23:58:20
  • WarrenBelz Profile Picture
    146,930 Most Valuable Professional on 19 Apr 2021 at 23:38:18
    Re: Deep Link to Record

    @godala_vamshi ,

    Please post this on a new thread (you can link this one for reference if you want to) as this one has been closed.

  • godala_vamshi Profile Picture
    174 on 19 Apr 2021 at 23:22:32
    Re: Deep Link to Record

    @tagustin2020  @Anonymous I followed exact  same steps but I'm getting below error when I try to click on any record on my app Gallery. Also when I try to do same action from power apps studio as app creator, I don't see same error but it just take me to same record every time I select different record. 

    "Getting your data"

    here is what I added on Item property varRecord, form works fine if I change Item property to BrowseGallery1.Selected but deep linking won't work. 

    godala_vamshi_0-1618874149798.png

     

  • Community Power Platform Member Profile Picture
    on 20 Sep 2020 at 04:11:08
    Re: Deep Link to Record

    @tagustin2020 

    Well done on getting it working, this was a real challenge! Also, thank you for posting your solution back here, as you say, it will provide others with guidance if/when they go looking to use Deep Linking.

     

    All the best.

  • WarrenBelz Profile Picture
    146,930 Most Valuable Professional on 20 Sep 2020 at 00:54:44
    Re: Deep Link to Record

    Thanks @tagustin2020 Theresa,

    One small thing you mentioned - I do all of my code "practice" in NotePad++ and do not have any issues with character translation.

  • Verified answer
    tagustin2020 Profile Picture
    on 19 Sep 2020 at 22:22:00
    Re: Deep Link to Record

    @Anonymous 

    @WarrenBelz 

     

    Hello,

     

    Thank you so much for your advice. I was able to get the deep links working today. Here is a recap of what worked for any other folks who come across this post while trying to sort out deep links. You mentioned things that aren't in the tutorials I referenced below so they were key to my success. I can't thank you enough!

     

    LINK TO NEW REQUEST FORM

    Video recommendation: April Dunnam’s Deep Linking tutorial

    https://www.youtube.com/watch?v=EZyxlYtzqTQ

     

    Step 1: I went to the Details screen of my app and clicked on the url. I added &hidenavbar=true&DeepLink=NewRequestForm to the end of it.

     

    Step 2: I went to the OnStart property of my app and entered:

    If(Param(“DeepLink”)=”NewRequestForm”,Navigate(frmNewRequest),Navigate(Home Screen))

     

    Things to be aware of:

     

    • If you type your formula in Word first or try to copy/paste from some other source, note that PowerApps doesn’t translate Word doc quotation marks very well so you have to delete them in PowerApps and re-enter them in order for this to work.
    • Deep Links must also be entered at the start of the formula in order to work.
    • PowerApps is case sensitive.

    Step 3: I went to my SharePoint site and created a new page. I entered a note into the default Text webpart and then added a “Call to Action” webpart. I inserted the deep link to the new form into the webpart and chose a stock image for the background.

     

    LINK TO A SPECIFIC RECORD

    Video recommendation: Shane Young's Deep Linking tutorial

     

    Step 1: I modified the url to include &hidenavbar=true&varRecord= at the end of it.

    Step 2: I added an email formula to the OnSuccess property of my form.

     

    OnSuccess formula:

     

    If(

        Not(varProjectStatus = varNewProjectStatus),

        Office365Outlook.SendEmailV2(

            varUser.Email,

            "Tool Support Design Request: " & txtRequestTitle.Text & " project status has changed",

            "The status of your tool design support request has changed to " & varNewProjectStatus & ". Here is a <a href='https://apps.powerapps.com/play/myGUIDandtenantIDdeletedforprivacy&hidenavbar=true&ProjectID=

    "& varRecord.ID & "'>link to the project</a>. Please check the Designer and Comments tabs for more details.",

            {Importance: "High"}

        )

    )

     

    Step 3: Enter the following formula into the OnStart property of the App:

     

    Set(varProjectID,

        Value(Param("ProjectID")));

    If(varProjectID <> 0,

        Set(varRecord,LookUp('Tool Design Support Requests',ID = varProjectID));

        Navigate(EditScreen));

     

    Things to be aware of:

    • varRecord is set in the navigation arrow of my gallery - clicking the arrow takes you to the record. Here is the OnSelect formula: Set(varRecord,ThisItem);Navigate(EditScreen,Transition.None)
    • The Item property of my form is varRecord
    • The Text property formula of my header label on the Edit screen is: "Project: " & varRecord.'Request Summary Title'
    • My deep link variable was varProjectID, but you can name yours whatever you want
  • Community Power Platform Member Profile Picture
    on 18 Sep 2020 at 03:18:09
    Re: Deep Link to Record

    @tagustin2020 

    That's great to hear. Yep, sometimes PowerApps does some things that you can spend hours trying to troubleshoot only to save&close then re-open and BOOM! all fixed! It can be quite frustrating.

     

    I now use a dev technique where I've tried everything I know and it should be working - I just save & close and re-open. Works a treat most times, haha.

     

    Let us know if you get stuck again and happy PowerApp'ing 🙂 

  • tagustin2020 Profile Picture
    on 17 Sep 2020 at 14:16:58
    Re: Deep Link to Record

    @Anonymous 

    @WarrenBelz 

     

    Hi Eelman,

     

    Good news! The app seems to be working correctly with the change of the Header Text property to "Project:  " & varRecord.'Request Summary Title'. It wasn't synching right after I first made the change, but later that night I tested the app and I tested it again this morning and it is working. The reason I had mentioned Microscope Mount yesterday afternoon was in case there was some kind of "LastSubmit" connection since usually if there is a mismatch, it is the first record in the SharePoint list showing up, not the latest record I worked on.

     

    Because you asked, the OnSelect properties of my tabs are all like this sample from the Request tab. There is no reference to varRecord. As you can probably tell, the second part of the formula simply controls which icon is displayed based on the form mode.

     

    Set(varFormTab, "Request"); If(frmRequestVE.Mode=FormMode.View,IconReqVEEdit,IconReqVESave)

     

    The Visible property of the Request form is: varFormTab="Request". I follow the same model for the other forms.

     

    I think I am good to go on the mismatched ID issue for now, I'll let you know if it rears its ugly head again. Next, I will work on trying out your Deep Link advice for the new and edit scenarios I'm working on.

     

    Thank you very much!

    Teresa

     

  • Community Power Platform Member Profile Picture
    on 17 Sep 2020 at 04:37:00
    Re: Deep Link to Record

    @tagustin2020 

    Great to hear you and your property is OK. Here's hoping it stays that way!

     

    What do you mean when you say " ... I get Microscope Mount which is the latest form I worked on. ..."? How were/are you working on this item/record? There maybe a clue here.

     

    My first thought was that the Items property wasn't set to varRecord but you have confirmed that it is so there goes that idea.

     

    What about the code for the various tabs? Is that setting Gallery.Selected or some other code ... clutching at straws here.

  • tagustin2020 Profile Picture
    on 17 Sep 2020 at 00:48:08
    Re: Deep Link to Record

    @Anonymous 

    @WarrenBelz 

     

    Hello there! The air is still filled with smoke, but my house is still standing and I haven't had to evacuate (knock on wood) so life is good at the moment. I'm still struggling to get my form header and forms to match up. I've attached a Word doc that shows all the varRecord references and also my Edit Screen OnVisible formula in case that helps. I have a meeting with the engineers Thurs, Sept 17 at 2pm so I would love to get this solved before then if possible, but if you can't reply right away no problem. I know you have busy lives too! I just wish I could figure out why I'm having so many problems syncing up my records.

     

    I'll work on the Deep Linking advice you gave me tomorrow morning while I'm waiting to hear back from you. Take care and have a nice evening!

    Teresa

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 78 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 38

Overall leaderboard