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 to specif...
Power Apps
Answered

deep linking to specific record

(0) ShareShare
ReportReport
Posted on by 39

Hi,

I am building an app and I want to send email to the supervisor for approving and signing the form in the power apps .

I tried following some videos about deep linking to specific record but it didn't work for me. When I click on the link in the email it keeps redirecting me to the detail screen with same record. And me my goal is to redirecting me to the current record created in sharepoint list by the user.

any help please

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    HI @halouane ,

    Please post the code (in Text) you are using for both generating the URL and the OnStart code used to capture the deep link.

  • halouane Profile Picture
    39 on at

    Hi WarrenBelz,

    You will find attached the code I used in onstart, start screen 

    On select button

    Office365Outlook.SendEmailV2("Houda.ALOUANE@eiffage.com", "Subject", "<a href='https://apps.powerapps.com/play/e/default-2ed0a394-379b-4092-aaee-9dce8bdb4f2d/a/30bf6c34-55a0-4e7d-ac5f-98365e2447fb?tenantId=2ed0a394-379b-4092-aaee-9dce8bdb4f2d&screenname=Admin&ID="&EditForm1.LastSubmit.ID&"&hidenavbar=true'>Link</a>");
    Navigate(Screen4,Cover);

    startscreen:

    Switch(
    Param("screenname"),
    "Admin",
    If(LookUp(OrdreDeMission,ID=Value(Param("ID"))).'Nom supersign'.Email=User().Email,DetailScreen1,Screen5),
    "Employer",
    'newrequest screen',
    "request",
    Screen4,
    Screen5
    );

    On start:

    If(!IsBlank(Param("ID")), Set(varID, LookUp(OrdreDeMission, ID=Value(Param("ID")))))

     

    Capture13.PNG
    Capture14.PNG
    Capture12.PNG
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @halouane ,

    Firstly the URL needs to include the parameter name (ID)

    <ahref='https://apps.powerapps.com/play/e/default-2ed0a394-379b-4092-aaee-9dce8bdb4f2d/a/30bf6c34-55a0-4e7d-...&ID=" & EditForm1.LastSubmit.ID & "&hidenavbar=true'>Link</a>");

    However your major issue is that you are referring to a parameter "screenname" in StartScreen which does not exist as you are sending the ID. Not only that, but it you are using StartScreen, you are better putting the OnStart code on the OnVisible of the target screen as StartScreen and OnStart do not seem to always coordinate.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • halouane Profile Picture
    39 on at

    Hi @WarrenBelz 

    About the ID parameter, I've already mentioned it in the URl 

    so as you said I will copy the code in onstart in on visible of detail screen but what about on start should I let it empty 

    this is the url including the ID

    https://apps.powerapps.com/play/e/default-2ed0a394-379b-4092-aaee-9dce8bdb4f2d/a/30bf6c34-55a0-4e7d-ac5f-98365e2447fb?tenantId=2ed0a394-379b-4092-aaee-9dce8bdb4f2d&screenname=Admin&ID="&EditForm1.LastSubmit.ID&"&hidenavbar=true

     

  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    @halouane ,

    I cannot see &ID= in your URL - OnStart does not matter if you have the same code OnVisible of the screen you are entering.

  • halouane Profile Picture
    39 on at

    Hi @WarrenBelz 

    I tried your suggestion but still don't work

    you find attached the screenshot of the the whole URL

    is the url correct?

    Now I tried another code but also didn't work for me 

    for gallery selected I have:

    Set(
    varID,
    ThisItem
    );
    Navigate(
    DetailScreen1,
    None
    )

    for detail screen Item I have:

    varID

    for OnStart I have:

    Set(varEmpID, Value(Param("RefID")));
    If(varEmpID <> 0, Set(varID, LookUp(OrdreDeMission, ID = varEmpID));(DetailScreen1))

    and for url is the one which you find attached 

    I don't know where I am wrong?

     

    Capture16.PNG
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    @halouane ,

    The most important thing here is for you to understand the effect of the code you are using. You are sending a parameter RefID, which you then capture in your OnStart (changed below)

    Set(
     varEmpID, 
     Value(Param("RefID"))
    );
    If(
     varEmpID > 0, 
     Navigate(DetailScreen1)
    )

    then the Item of your Form

    LookUp(
     OrdreDeMission, 
     ID = varEmpID
    )

    If you are selecting the form from a Gallery during normal operation - OnSelect of the Gallery

    Set(
     varEmpID,
     ThisItem.ID
    );
    Navigate(DetailScreen1)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • halouane Profile Picture
    39 on at

    Hi@WarrenBelz,

    yeah absolutely.

    still not working for me 

    I don't know where I am wrong 

    should I write a code in start screen to ask for redirecting to detail screen 

  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    HI @halouane ,

    Can we please regroup here as my last post should work based on what you have posted. OnStart of this

    Set(
     varEmpID, 
     Value(Param("RefID"))
    );
    If(
     varEmpID > 0, 
     Navigate(DetailScreen1)
    )

    will set the Variable varEmpID to the value of the incoming parameter RefID (if it exists), so put a label on both of your screens with varEmpID on it, run the app and see if it shows. Also for the moment make sure this is turned on - we will deal with StartScreen etc once we make sure the parameter is actually working

    WarrenBelz_0-1673989652348.png

     

     

  • halouane Profile Picture
    39 on at

    Hi@WarrenBelz,

    I turned on the navigate function in onstart but still showing me the error of navigate is not allowed in onstart when app.startscreen has a value. start screen is empty no code there.

    and I checked the RefId is it's passed or not by trying your suggestion of label but I see that it didn't show me the parameter so no parameter is passed.

    I don't know what is the problem here 

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 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard