ml365

Sharing a little about the world of Dynamics 365 and other related technologies

Get all Power Automate flows that use a given field (Web Api)

We often come across scenarios in which we need to consult all the dependencies of a field, either to investigate an error we are dealing with or to remove that field without any major impact.

Faced with this need, we can use the native Dynamics 365/Power Apps feature that shows us the dependencies of a field:

This path is familiar to the vast majority of Dynamics 365/Power Apps developers, but in this post I'd like to present another path that tends to be more efficient when we only want to visualize Power Automate flows that make use of a given field.

A solução consiste em utilizar a URL Web API concatenada à seguinte query: workflows?$select=name&$filter=contains(clientdata, ‘<fieldname>’). Assim, supondo que a Org Name de seu ambiente seja ‘teste123’ e o ambiente esteja hospedado na América do Sul (crm2), a URL final ficaria assim:

https://teste123.crm2.dynamics.com/api/data/v9.1/workflows?$select=name&$filter=contains(clientdata, ‘<NOME_DO_CAMPO>’)

Now, to define the field to be filtered, simply replace the 'FIELD_NAME' phrase with the logical name of the field you want to search for:

https://teste123.crm2.dynamics.com/api/data/v9.1/workflows?$select=name&$filter=contains(clientdata, ‘new_teste’)

The result will look something like this:

In the list of results, you will see all the flows (name and id) that make use of the field provided. One point to note, however, is that if the logical name provided is used in more than one table, the results will include all occurrences, so be aware of this detail.

Abs and see you next time 😉

One response to "Get all Power Automate flows that use a given field (Web Api)"

  1. MarioCosta's avatar
    MarioCosta

    I thought it was beautiful.

Leave a comment for MarioCosta Cancel reply

Your e-mail address will not be published. Required fields are marked with *