web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to send send de...
Power Apps
Unanswered

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,297 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,297 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.

  • RandyHayes Profile Picture
    76,297 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,

  • RandyHayes Profile Picture
    76,297 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,

  • RandyHayes Profile Picture
    76,297 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,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard