If you are creating a flow then you need to determine whether you should create it inside a solution or outside. The choice will have potential impact on how and where you need to consume the flow.
Yesterday, I had a requirement where I needed to run a flow in the context of account entity from within Dynamics 365 Customer Engagement app (Dynamics CRM). The flow was required to connect to SharePoint also. So, the flow would have to use:
- “When a record is selected” CDS trigger; and
- Couple of SharePoint actions
I created the flow inside the solution in Power Apps maker portal but it didn’t appear in Dynamics 365. So I created the flow with the same trigger and actions again, this time outside the solution, and it appeared in the flow drop down button of the command bar in Dynamics 365. Well, this was weird so after having the task completed I researched a bit around this issue.
I tried to add the flow to the solution, that I had created outside the solution but again it didn’t appear in the existing flows list. Instead, I found a notification there telling me that “some flows are currently not available to add to solutions” with a learn more link that was pointing towards the known limitations section of the documentation.
Of course Microsoft would address some of these limitations in near future, but the known limitations that apply to the use of flows in solutions as of today are following:
- Canvas app button triggered flows are currently not supported in solutions. Create the app and flow outside of a solution, and export the .msapp file to migrate canvas apps with an embedded button triggered flow.
- Importing a solution containing a flow will not automatically create or associate required connections. The flow must be edited to fix the connections.
- Flows created from solutions will not be displayed in the “Team Flows” list. They must be accessed through a solution.
- Button triggered flows are not available in solutions.
- Flows triggered from Microsoft 365 applications such as Excel are not available in solutions.
- Flows that connect to SharePoint are not available in solutions.
- Flows in solutions don’t support delegated authentication. For example, access to a flow is not automatically granted based on having access to the SharePoint list the flow was created from.
For a complete list of limitations that apply to the use of canvas apps, flows and custom connectors in solutions, please read the documentation.
As we can see in the limitations listed above that flows triggered from Microsoft 365 applications as well as flows that connect to SharePoint are not available in solutions. So, in my case both, the CDS trigger and a SharePoint action, were preventing the flow from appearing in Dynamics 365.
Conclusion
Having knowledge about the known limitations stated above would make it easier to decide if we should create a flow inside a solution or outside. That would save a great deal of time too.
*This post is locked for comments