Moving to Flows from D365 Custom Plugins

If you're like most D365 organizations, you use background workflows. Depending on the nature of your business, you likely have custom plugins embedded in many of those background workflows. While Microsoft hasn't officially announced the deprecation of background workflows, they are recommending that you transition to using MS Flows.

To prepare for this transition, we've been brainstorming how we will convert them to flows, specifically those that have custom plugins. Some very basic plugins can be replaced with flow logic (specifically, items that simply query a list of records or update basic fields several records in a given list) and those that make more sense to keep as code can be replaced with HTTPTrigger functions.

Creating an HttpTrigger function is fairly simple to set up in an Azure function app. You can create it directly in the portal. Once created, it will automatically generate an Http url for you and then you can add your code. In the example below, I have 3 inputs, perform some logic and then return the response as a JSON object:

You can then easily add your HTTPTrigger function to a flow:

The steps in the flow above are the following:

  1. Flow triggers based on some change in Dynamics
  2. Then it retrieves the correct HTTP Trigger URL (because they may be different between Dev and PRD). The URL will be stored in an Environment Variable unique to each environment.
  3. Then it makes a POST call to the HTTP trigger function with a JSON body appropriate for (keep reading on www.beringer.net)

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Show Buttons
Hide Buttons