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 / Unable to send send de...
Power Apps
Answered

Unable to send send deeplink

(0) ShareShare
ReportReport
Posted on by 341

Hi.

 

 

I am trying to create an approval process without using Power Automate flow. I have done the below. It was working perfectly fine and it also sent me the deeplink to approve the order. But now it stopped sending the deeplink. 

 On Start :

 

Set(
varCurrentUser,
User()
);
Set(
varCurrentDept,
Office365Users.MyProfile().Department
);
If(
!IsBlank(Param("ID")),
Set(
varRecord,
LookUp(
'Stationery Order Request',
ID = Value(Param("ID"))
)
);
Navigate(
scrCurrentOrders,
ScreenTransition.Fade
)
);
Clear(colCurrentApprovals);
ClearCollect(
colApprovals,
Filter(
'Stationery Order Approval',
Approver.Email = varCurrentUser.Email
)
);
ForAll(
Filter(
colApprovals,
IsBlank(Outcome)
),
Collect(
colCurrentApprovals,
LookUp(
'Stationery Order Request',
ID = Parent_ID
)
)
);
Set(varListTab,"Main")

 

 

I have done this code on OnSucess for my form:

 

Set(
varRecord,
frmStationeryForm.LastSubmit
);
Navigate(
scrWelcome,
ScreenTransition.Fade
);
Notify(
"thank you for submitting this form. It has been sent to approvers for review.",
NotificationType.Success
);
If(
varRecord.FormStatus = "New",
Patch(
'Stationery Order Approval',
Defaults('Stationery Order Approval'),
{
Title: cmbPickManager.Selected.DisplayName,
Approver: {
Claims: cmbPickManager.Selected.Claims,
DisplayName: cmbPickManager.Selected.DisplayName,
Email: cmbPickManager.Selected.Email,
Department: "",
JobTitle: "",
Picture: ""
},
Parent_Lookup: {
Id:Value(varRecord.ID),
Value:varRecord.ID
},
Parent_ID:Value(varRecord.ID)
}
);
Patch(
'Stationery Order Request',
varRecord,
{FormStatus: "Submitted"}
);
Office365Outlook.SendEmailV2(
varCurrentUser.Email,
varRecord.'Created By'.DisplayName & " " & "Stationery Order Request",
varRecord.'Created By'.DisplayName &" "& "has submitted a Stationery Order request. Please click the link below to review.<a href=""https://apps.powerapps.com/play/ba5abc5e-1e04-463f-af24-6eff1838fb05?tenantId=4e823f98-fbe5-4e6e-af9..." & varRecord.ID & """>CLICK HERE</A>"
)
)

 

Could you please tell me what is the issue and why it has stopped sending me the deeplink?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @MiteshGovan 

    I assume we are picking up from this post.

    You have several issues in your formula, I had suggested the following formula there, please revisit this formula as this will work for you.

    With({lastItem: frmStationeryForm.LastSubmit},
     If(submitted.FormStatus = "New",
     Patch('Stationery Order Approval', Defaults('Stationery Order Approval'), 
     {
     Title: lastItem.Title,
     Approver: {
     Claims: "i:0#.f|membership|" & Lower(lastItem.Manager.Email),
     DisplayName: lastItem.Manager.Email,
     Email: lastItem.Manager.Email,
     Department: "",
     JobTitle: "",
     Picture: "",
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_Lookup: {
     Id: lastItem.ID,
     Value: lastItem.ID
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_ID: lastItem.ID
     }
     );
     
     Patch('Stationery Order Request', lastItem, {FormStatus: "Submitted"})
     );
    
     Office365Outlook.SendEmailV2(varCurrentUser.Email,
     submitted.'Created By'.DisplayName & " Stationery Order Request",
     submitted.'Created By'.DisplayName & " has submitted a Stationery Order request. Please click the link below 
     to review.<a href='https://apps.powerapps.com/play/ba5abc5e-1e04-463f-af24-6eff1838fb05?tenantId=4e823f98-fbe5-4e6e-af9..." & lastItem.ID & "'>CLICK HERE</A>"
     )
    );
    
    Notify("thank you for submitting this form. It has been sent to approvers for review.", NotificationType.Success);
    
    Navigate(scrWelcome, ScreenTransition.Fade);
    

    One change in this that I have made, your values for the Patch statement should NOT reference the controls on the form but instead to the submitted values.  I made that adjustment in the Title and Approver, but I might be off on their actual field names...adjust accordingly.

     

  • MiteshGovan Profile Picture
    341 on at

    Hi

     

    I have tried the above yet the deeplink is not been sent. Alternatively on my send button i have done the following which gets send to my email. 

     

    Office365Outlook.SendEmail(User().Email;"mitesh.govan@ascendishealth.com","Here is our email subject",

    "<table width='50%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
    Concat(ShoppingCart,

    "<br>Brand :" & ItemBrand
    & "<br>Description: " & ItemDescription &

    "<br>Quantity: " & OrderQuantity
    & "<br>Colour: " & ItemColour&"<br><br>")
    & "</table>"
    ,
    {IsHtml:true}

    );
    SubmitForm(frmStationeryForm);Clear(ShoppingCart);ResetForm(frmStationeryForm)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @MiteshGovan 

    So what is your current OnSuccess formula?

    If the email is not getting sent from that, then there is something going wrong in the patch.

  • MiteshGovan Profile Picture
    341 on at

    It gets patched to the Stationery order request but it doesn't get patched to the stationery order approval. The onSuccess formula is the same as the above. I have tried your formula but it still doesn't work which i have switch to the current formula i had.

    stationery order approval.PNG
    Stationery order request.PNG
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @MiteshGovan 

    Your OnSuccess formula should be the following:

    With({lastItem: frmStationeryForm.LastSubmit},
     If(submitted.FormStatus = "New",
     Patch('Stationery Order Approval', Defaults('Stationery Order Approval'), 
     {
     Title: lastItem.Title,
     Approver: {
     Claims: "i:0#.f|membership|" & Lower(lastItem.Manager.Email),
     DisplayName: lastItem.Manager.Email,
     Email: lastItem.Manager.Email,
     Department: "",
     JobTitle: "",
     Picture: "",
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_Lookup: {
     Id: lastItem.ID,
     Value: lastItem.ID
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_ID: lastItem.ID
     }
     );
     
     UpdateIf('Stationery Order Request', ID=lastItem.ID, {FormStatus: "Submitted"})
     );
    
     Office365Outlook.SendEmailV2(varCurrentUser.Email,
     submitted.'Created By'.DisplayName & " Stationery Order Request",
     submitted.'Created By'.DisplayName & " has submitted a Stationery Order request. Please click the link below 
     to review.<a href='https://apps.powerapps.com/play/ba5abc5e-1e04-463f-af24-6eff1838fb05?tenantId=4e823f98-fbe5-4e6e-af9..." & lastItem.ID & "'>CLICK HERE</A>"
     )
    );
    
    Notify("thank you for submitting this form. It has been sent to approvers for review.", NotificationType.Success);
    
    Navigate(scrWelcome, ScreenTransition.Fade);

     

    Please put this in place and tell me where the issue comes in.

     

    Also, what type of column is FormStatus?

     

  • MiteshGovan Profile Picture
    341 on at

    Hi 

     

    I have tried your formula but i seem to get a lot errors. Please see the attached.

     

    Kind Regards,

    Stationery order request 2.PNG
    Onsuccess.PNG
    stationery order approval 2.PNG
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @MiteshGovan 

    We need to keep at this formula to get it to work.  Simply abandoning because there are some errors is not going to get us anywhere.

    Please keep in mind that I type these formulas by hand without the help of the formula editor...so there are bound to be some typos and mistakes.  Please correct them when you use them.

    I see a couple of typos that I had.

    Below is the formula with those items corrected.

    With({lastItem: frmStationeryForm.LastSubmit},
     If(submitted.FormStatus = "New",
     Patch('Stationery Order Approval', Defaults('Stationery Order Approval'), 
     {
     Title: lastItem.Title,
     Approver: {
     Claims: "i:0#.f|membership|" & Lower(lastItem.Manager.Email),
     DisplayName: lastItem.Manager.Email,
     Email: lastItem.Manager.Email,
     Department: "",
     JobTitle: "",
     Picture: "",
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_Lookup: {
     Id: lastItem.ID,
     Value: lastItem.ID,
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     Parent_ID: lastItem.ID
     }
     );
     
     UpdateIf('Stationery Order Request', ID=lastItem.ID, {FormStatus: "Submitted"})
     );
    
     Office365Outlook.SendEmailV2(varCurrentUser.Email,
     lastItem.'Created By'.DisplayName & " Stationery Order Request",
     lastItem.'Created By'.DisplayName & " has submitted a Stationery Order request. Please click the link below 
     to review.<a href='https://apps.powerapps.com/play/ba5abc5e-1e04-463f-af24-6eff1838fb05?tenantId=4e823f98-fbe5-4e6e-af9..." & lastItem.ID & "'>CLICK HERE</A>"
     )
    );
    
    Notify("thank you for submitting this form. It has been sent to approvers for review.", NotificationType.Success);
    
    Navigate(scrWelcome, ScreenTransition.Fade);

     

    Substitute the above formula in your OnSuccess and let me know where that gets you.

  • MiteshGovan Profile Picture
    341 on at

    Hi

     

    There is just one error on the submitted in the beginning as it is not found.

     

    Kind Regards,

    Onsuccess.PNG
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @MiteshGovan 

    Oops - change that Submitted.FormStatus to lastItem.FormStatus

  • MiteshGovan Profile Picture
    341 on at

    Hi

     

    Thank you the deeplink works but the approval does occur. Please see the attached image.

     

    Kind Regards,

    approval.PNG

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard