Wouldn’t it be great if you could call flows from a model driven app? Well you can , but it is not without its difficulties.
It is easy to start flows from a Canvas app and actually Model driven apps aren’t much harder.
In my case I wanted to create a quote for an opportunity and the document generation told available just weren’t good enough. I wanted my quotes to look better. There are plenty of other processes that I could imagine I would want to start a flow from a model driven app for. But this is quite a nice example flow.
This Send quote flow will send me an email with all of the quote details coming from my opportunity, related account and order lines.
Quite quickly I created a flow that started with the When a record is selected.
And then the Send quote options appeared right there with my opportunity in my model driven app.
I managed to run the flows and I got this great success message.
Then I started to make some changes to my flow and suddenly things went wrong.
And as a scrolled down that message and clicked on the show more details message there is a message that related to the trigger being incorrect.
Time:
Server/Client Correlation ID: 2733bc97-c17b-4751-9b18-e07da64b140e
x-ms-client-request-id (Client->Backend Request Header): 1947f358-8355-453c-a8f4-d730-e74bb6f8
Error: The input body for trigger ‘manual’ of type ‘Request’ did not match its schema definition. Error details: ‘Required properties are missing from object: value.’.
Whatever that is all about, it is not nice!
So I deleted the trigger and then re-added the trigger and fixed all the references to properties that came from my trigger and I managed to start my flow from my Model driven app once again.
Sometimes I can edit the flow 10 times without any problems and sometimes I have to re-update the trigger after every update. This seems to be a bit of an annoying bug. If you happen to find the same issue and you have a better workaround then please leave a comment below.
Last week Shane Young asked me about calculating the Sum for a SharePoint column in…
In Power Apps when you do a Patch to create a new item or to…
Getting started with adaptive cards can be difficult. In this post i have written some…
In this post I will look at how to create PDF documents from data. Use…
We all know this problem, you have a nested array in Power Automate but how…
Yesterday one of my clients showed me an issues where the Advanced settings didn't load.…
View Comments
Hi Pieter,
At first I also thought this is a bug, but I have found out that whenever I reference a form field in my flow, the shceme of the trigger action changes this field to “required” (you can verify it by “peeking code” in the trigger action), even if this field is not required in the CDS entity. And if I don’t supply a value for this field in runtime, I get this error.
The solution I have found is not to reference the fields from the triggerbody action in my flow, but instead, add a “get item” action as the first action in the flow (right after the trigger), and get the item with the same ID as the triggered item. Then, I reference whatever fields I need from the “get item” action, yet the trigger action scheme do not mark any field as required, and the error disappears.
Thanks Gil, that is actually what I have done and the problem has gone away. I just thought that it was temperamental thing.
Hi Pieter,
At first I also thought this is a bug, but I have found out that whenever I reference a form field in my flow, the shceme of the trigger action changes this field to “required” (you can verify it by “peeking code” in the trigger action), even if this field is not required in the CDS entity. And if I don’t supply a value for this field in runtime, I get this error.
The solution I have found is not to reference the fields from the triggerbody action in my flow, but instead, add a “get item” action as the first action in the flow (right after the trigger), and get the item with the same ID as the triggered item. Then, I reference whatever fields I need from the “get item” action, yet the trigger action scheme do not mark any field as required, and the error disappears.
Hi, i also experienced that, it is quite fragile. Also when you deploy a solution including such flow, to an other environment, it will break… I had to redo the flow as a solution
An other question : we have per user app plan licence, and flow isnt apparently included, we needed to buy separated flow or M365 licence. Did you experience that ?
Thank you?
Hi Jeff, is your flow a Power App flow? Or is it a different type of flow.