Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Issue in workflow by m...
Finance forum
Suggested answer

Issue in workflow by mail (Link to web)

Posted on by 339
I created a custom form Customer deduction with header and lines tables (deduction header , deduction line) 
also I created a custom workflow on lines only 
Now I try to send workflow by mail (link to web) but when I click on link I got this error 
 
the specified record query failed to apply and the form can't be opened .
 
also I changed property on menu item 
allow root navigation to yes 
copy caller query to yes 
 
but no thing is working 
 
 
 
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Issue in workflow by mail (Link to web)
    thanks Andre 
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,263 Super User 2024 Season 2 on at
    Issue in workflow by mail (Link to web)
    Hi Menna,
     
    I'm not having time to do the actual work for you. This is something that will require quite some hours. For that reason, I shared some hints and a link to an example where I changed the URL parameters with X++ coding.
     
    For the workflow notification, you can build your own URL for opening the menu item of your custom form without the query parameter, but include another parameter, e.g. the line record ID reference.
    On the custom form, check if the additional parameter is present with a value, then use that to set ranges to your form.
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Issue in workflow by mail (Link to web)
    Hi Andre ,
     
    can you explain what is code should I add in my custom form ?
    I need to make link that sent to my mail to open form with record that assigned of workflow 
    when I denug init method in form I can't see any record 
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,263 Super User 2024 Season 2 on at
    Issue in workflow by mail (Link to web)
    Hi Menna,
     
    The URL in the link has information on what form to open and set a specific query. The URL is missing a parameter to open the details page type (pageType=Details). The standard deep link feature is not able to handle your scenario. 
    You can try to create your own logic that would be able to open a form. Probably this would need also a form extension (or add coding to your custom form). 
    You can add parameters to the Dynamics URL and read them in coding. You can download an example where I manipulated URL parameters using X++ coding. Session Language - Dynamicspedia
     
    The workflow should then create another URL and you would need to interpret in to know what to do when your custom form opens. You can e.g. use a parameter like &lineRef=562374263641. This parameter could be a record ID of the line record.
     
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Issue in workflow by mail (Link to web)
    https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcfm-d365dev0607a792a156c53a39devaos.cloudax.dynamics.com%2F%3Fcmp%3DCFM%26prt%3Dinitial%26mi%3Ddisplay%3ACustDeductionCFM%26q%3DBgAAAHDiUOM7uJk3mjL1oT8arMXp15DuacnHVCR%252fpZOvBwJi%252fW3QOgyh64mdsw5GxkgpZqWq92hyK8GKkzjbzcEZH7fqTR9XcnubKUU%252bza%252fFW7eh35Wk429OC847himFIeokNQQnAOrwaPOEa7KGefxVpM%252bDcidKT%252b1waNi%252fD88trDVfwhJFT0lzjP%252fd6VrKRQJwtNq0BstVGj1wrqfNAlYzwLJKdcjfEe91AFA0R4OlUhJ8SZaq6U%252fzfvoH6bNn8Uhn5P9rYliR5tMGCfhrM%252bmbMyTGRLTD42b4q6o4cSoxu9x4CsutlVgAAz3Xl2d3mgiurTpR9iTGacsN63aArVAN9VUglflXqWdty7k4Vvvga%252b6VpcV1EWSWfjPr8uP6zs0NRdEYenFIYw6IY7tPIAAgk%252bjUQcSghUA%252bjrJSR9We9XMw2pctf8tIzAvPPL96TPKVDu%252fFaAvmIz30UBgUExttmsxV98qsjjovWYP0itmhKy2bXxuRvnUFHL2fQFkoo9lERHld8PPwzT36heCqIPUgwIXlOj6bnhH8QZzRkxZia7GdGLPwH0t%252fDvrJ3k2prOG%252bAdjQRkSr4g%252fX%252ffSgseLjFEJ4v8WNaAcWoW95EbsBBrJg8tE%252bCcDoAa5%252fN%252bfNuJ%252bokgHHF4ZYPdi80ikNicbeyU5HZ1mjeue8tu4wZTbKVJEEv2WEy%252fbJKV%252f8wBmR29JXor%252bt1vBKXPZa2atYQcQV1Py8%252bm2n6W4afnogwAjyy5ji0hcSYI7Humld6ZAj%252f1vXvL61Mijre5YGgD9eeppfAMWsnI4iZk9qPIN3cYtrZYXo%252f9gLRSVdFuXbJxv2ZeOAo0nXQLQXWBsGwcaiz7rJoON%252b4jqkHNjRpajhE1O%252fEVWJXiMEJh%252bcKkPdBGaUDm4NlZJI6W0RdT1Y&data=05%7C02%7CMAlahAhmed%40CONTRACKFM.com%7Ce6089186d9d2483c9b7d08dc1cddb438%7C3801c85db5024a5694182fc4c257bfec%7C0%7C0%7C638416985742038260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ikPqViZo5Owjmo5LOSm1yckTELtc7P1n5gBqIbroyds%3D&reserved=0
     
    this is a link created from workflow , URl sent to email corerectly 
    my Form is a custom form with details master pattern , datasource header but workflow created on lines only not header as you said 
    so link tried to fix line not header 
    How can I fix this problem ?
  • Waed Ayyad Profile Picture
    Waed Ayyad 5,149 Super User 2024 Season 2 on at
    Issue in workflow by mail (Link to web)
     
    Does your form have a design patten or you set it as custom?
     
     Thanks
    Waed Ayyad
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,263 Super User 2024 Season 2 on at
    Issue in workflow by mail (Link to web)
    Hi Menna,
     
    I do assume the email is sent and received correctly. Can you share what exact URL is created for the link in the email? Note that standard deep links will open a form trying to find the details page and a record for the main data source.  In case your main data source is a header, but the link is trying to find a line, this can be an issue.
  • Menna Allah Ahmed Profile Picture
    Menna Allah Ahmed 339 on at
    Issue in workflow by mail (Link to web)
    yes I mean this link , but I tried this on environment with system admin access so error doesn't related to access 
    can you explain what 's  the corresponding voucher field 
    query failed yes but I don't know how to fix it ?
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    Issue in workflow by mail (Link to web)
    Hi,
    When you say link to web, do you mean that clicking on the link in the email will open a new page and jump to that link? If so, does the URL need to do any permission checks, or does the record query requires any credentials, such as tokens? It may be that the page lacks the relevant permission field, so the verification fails, or it may be that the corresponding voucher field cannot be found when you do the record query, so the query failed.
    Best regards,
    Kevin

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans