cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kumar9024021
Helper V
Helper V

Deep linking technique sends correct URL in email, but navigate to appropriate screen failing.

I am using deep linking technique in Powerapps to pass an ID for specific sharepoint list item in Email, so that when approver clicks on that link in email, it redirects to the approver form directly for that specific item.

 

1. In NewForm, submit button OnSelect, I included below piece of code

    Office365Outlook.SendEmail("abc@abc.com","Your request is submitted for approval","https://web.powerapps.com/apps/xxxx-xxxx-xxxx-xxxx?ItemID=" &NewForm.LastSubmit.ID)

 

2. In NewForm, I included timer control, AutoStart set to true and visible set to False. OnTimerEnd, I included below piece of code

If(Not(IsBlank(Param("ItemId"))),Navigate('Approve Screen', Cover,{ID:LookUp('Datasource',ID = Value(Param("ItemId")))}))

 

3. In Approve Screen form, Item property, I included below piece of code

First(Filter('Datasource', ID = Value(Param("ItemId"))))

 

I noticed that after running the app, I receive approval email correctly with expected ItemID something like below

https://web.powerapps.com/apps/xxxx-xxxx-xxxx-xxxx?ItemID=49

 

However, once I click on the URL from the email, it doesn't redirect me to Approve Screen, as highlighted in Step 2.  I can see the URL correctly in the browser with correct ItemID, but doesn't see expected screen and the particular item edit form.

 

Any technical advice would be helpful. Thanks.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Kumar9024021 

Noticed you kudoed the post.  Did my idea work for you?

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@Kumar9024021 

Instead of using a timer control I suggest you put this code in the OnStart property of your App.

Set(ItemId, If(!IsBlank(Param("ItemId")),Value(Text(Param("id"),"[$-en-US]0")),Blank()));
If(!IsBlank(ItemId),Navigate('Approve Screen',Cover));

 

Then use this code in the Item property of your Approve Form

LookUp('Datasource',ID=ItemId)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@Kumar9024021 

Noticed you kudoed the post.  Did my idea work for you?

View solution in original post

Yep @mdevaney . Thanks a lot.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,345)