Microsoft Flow – Perform action on update of specific field in Dynamics 365 Customer Engagement

By | November 9, 2018

Introduction:

Microsoft Flow is the best thing ever happened to citizen developers.

The flexibility to perform some actions and the ease at which those actions can be configured is the deal breaker.

Microsoft Flow is a sister app to Azure Logic Apps, but the fact that it is so well integrated with Dynamics 365 Customer Engagement (D365 CE), makes it the most desired platform amongst the citizen developers group.

Now, as we all know that the Microsoft Flow offers a plethora of existing connectors to choose from. Within those existing connectors, we have a connector for D365 CE.

For D365 CE connector, we have below triggers (at the time of writing the blog):

  • On Demand
  • On Update
  • On Create
  • On Delete

Just like a workflow or a plugin that we develop, we have the flexibility to define the fields, on update of which the logic would trigger.

For Microsoft Flow, the Flow is always triggered on an update and not on update of a specific field.

So, the question arises, what to do if we want to trigger the Flow on update of a specific field in D365 CE?

Well! It is not a big deal, let us lay down the simple steps that can be undertaken in order to achieve the said functionality.

Scenario:

Consider a scenario where, I have a Project entity and Contact is related to that project entity in 1:N relation. Which means that 1 Project can have multiple Contacts associated to it.

So, whenever the Status of the Project changes from New -> Picked Up -> Something Else, we need to update all the Contacts about the Status progress.

So, in order to this we either have to develop a Custom Assembly and use it in the Workflow or we can develop a Plugin. This means that we need a skilled developer for this.

Now, with the help of the Microsoft Flow, this can be achieved fairly by a citizen developer.

Steps:

Step 1

On Update of the Status trigger an OOB Workflow (again, this is fairly simple), that’d go and set the “Trigger Flow?” field to Yes (This custom field is the determiner for the Microsoft Flow).

Step 2

Create a Flow, by choosing the “D365” Connector and “When a record is updated” as a Trigger point.

Step 3

Next thing we need to do is check whether the “Trigger Flow?” field is set Yes or No.

Microsoft Flow - Perform action on update of specific field in Dynamics 365 Customer Engagement

Step 4

Perform your logic.

Step 5

Set the “Trigger Flow?” field to No.

Microsoft Flow - Perform action on update of specific field in Dynamics 365 Customer Engagement

So, it is this simple to design the Microsoft Flow to trigger only when the specific field is updated in D365 CE.

Conclusion:

Following the steps above in Microsoft Flow, citizen developers could achieve something that otherwise would have required a skilled developer in the old days.

Read our blog series on Microsoft Flow in Dynamics 365

6 thoughts on “Microsoft Flow – Perform action on update of specific field in Dynamics 365 Customer Engagement

  1. Lars Martin

    Hi,
    why do you not use CDS connector?
    It provides ootb the ability that the flow is only triggered when a specific field is updated.

    Best regards Lars

    1. Inogic

      Hi,

      Of course, that’s also available.

      The blogpost is for the folks who want to use Dynamics 365 connector and achieve it.

      Thanks for your suggestion.

  2. Priya Jadhav

    Can you please let me know why we need “Trigger flow” field to trigger the above Flow?
    cant we use directly “status” field instead? if yes please help me to achieve this.

    1. Inogic

      Hi,

      The reason why we used “Trigger Flow” field is to set it to No again, so that next time when the Flow triggers, it will see if the Trigger Flow is Yes or No, if it’s No, then stop and this way we’ll avoid recursion.

      To answer your question, whenever the Flow triggers, there is no way to know (while using the Dynamics 365 connector) which field was updated and resulted the Flow to trigger.

      Thanks!

  3. Vivek

    Hi,
    Instead of having Dynamic 365 connector it’s better to have a CDS connector. In that, we get the facility to trigger our flow based on the specific field, which we don’t get inside Dynamic 365 connector.
    Do correct me if I am wrong.

    Thanks!

    1. Inogic

      Yes, you are correct, instead of having Dynamics 365 Connector, we have CDS Connector where we can trigger flow based on the specific field. So, better to use CDS Connector. You can also refer our all latest blogs where we have used CDS connector, to explore more such features.

Comments are closed.