Trigger on update
Today we gonna look on options, how to trigger a flow, when an opportunity is set to status "won", using the different CDS/Dynamics connectors.
Dynamics 365
The Dynamics365 connector has been announced as depricated in April 2019, so it should not be used anymore. Still if you have a look at templates in PowerAutomate, many templates for this connector are offered, like:
It starts of with defining either a "When a record is updated" or "When a record is created or updated" trigger:
In the trigger you define to which CRM organization your flow should be connected and on which entity it should be executed.
Then you define a check condition, e.g. in this case to check if the status equals 1 (=won). In case the condition evalutes to true, you create a new project, else the flow does nothing.
The big short comings on this approach (according my point of view) are:
- deprecated connector
- flow triggers on every update, not only if the status has been changed
Common Data Service
The Common Data Service offers the following triggers:
In this case we choose the trigger "When a record is updated" and again choose the organization and the entity on which the flow shall run. In addition this time we can choose the scope in which the flow shall be executed and even the attributes on which the flow shall be triggered.
Again we setup a condition to check the state code and an action to create a new project.
So this looks a lot better compared to the options provided by the Dynamics365 connector, since in this case we can limit our flow to only run, when the status of the opportunity is being changed.
Common Data Service (current environment)
The Common Data Service (current environment) connector is only offered, if you add your flow to a solution. It offers only one trigger:
But once you selected this trigger, it offers far more options to choose, on which message the flow should be started:
Since we chose the current environment connector, we do not have to specify the organization. Again we can choose the entity, the scope and the attributes on which the flow should be triggered.
Compared to the "normal" Common Data Service connector, in this case we have to write down the field names manually in the filtering attributes field, instead of being able to choose them from the dynamic content.
The advantage of this connector is:
- Solution aware flow
- More flexibility in regards to triggering message
Comments
Post a Comment