In a previous article, we check how we Write a Custom API and calling it from classic workflow. It worked well, yet we encountered some hiccups in deployment. Actually, recommended way it co call it from a Cloud Flow than a workflow.
Lets check that using a simple sample Cloud Flow. Implementation of the Custom API remains the same. Please refer that part from previous post.
Lets do the calling part from a Cloud Flow. I would select a flow that would could be triggered on demand from the custom entity (in our case so_office).
First I am selecting a task to trigger when selecting a record from Office where I need to select the environment along with entity.
Here I demonstrated only simple on demand flow for ease of demonstration, but what we need to learn is, in any flow we can call out Custom API using Performa Bound Action of Microsoft Dataverse. Most importantly, this is the recommended way than calling from a workflow.