Filtering in Cloud Flows by Enums from Dynamics 365 FO

You want to use data from Dynamics 365 Finance and Supply Chain in Power Automate and filter there for so-called values in enums and get stuck?

Then I have a little tip for you.

To get the right name for the enum, I use a “List Items present in Table” action:

In this action I set the value for the filter query to the field and the value I want to filter. Here in my example I want to filter the entity SalesOrderHeadersV2 for open orders. The value for open orders is “Backorder” and is in the SalesOrderStatus field.

With this filter query, I’ll just run my Cloud Flow test.

The execution now runs on error because my filter query is not correct.

In the Error Details I now find the hint to my error

A binary operator with incompatible types was detected. Found operand types ‘Microsoft.Dynamics.DataEntities.SalesStatus’ and ‘Edm.String’ for operator kind ‘Equal’.

which now brings me the hint to the correct value in the filter query:

My correct filter must be here

SalesOrderStatus eq Microsoft.Dynamics.DataEntities.SalesStatus’Backorder’

because I want to filter on a value from an enum.

Now I run the flow again and voila, it runs through without error.

I hope this helps you.

Similar Posts

  • Supplier Communication Agent

    We’ve all been there: a supplier confirmation for an order is missing or a supplier doesn’t deliver on time. Microsoft has now made a standard solution available in Dynamics 365 SCM with the help of an agent. in this video I give you a first insight into how this agent works. The agent can formulate…

  • Invoice Capture – Demo Support

    You want to present the new Dynamics 365 feature “Invoice Capture” and are struggling with the provision of suitable invoices to show the process from order creation to invoice posting in one flow without having to edit documents? Then I have a small workaround for all the presentations / trainers among you. Model driven app…

  • Item number rules

    In many companies there are talking article numbers. I would like to give you a brief idea of how you can solve this with Dynamics 365 Finance and Supply Chain in the standard. To do this, I use the integrated Engineering Change Management (ECM). In ECM, I create a engineering product category: Here in my…

  • #DeutschlandPowerthon2021

    From 01 to 06 November the #DeutschlandPowerthon will take place. The Powerthon is a free event in the community. I will also be there as a speaker, holding a slot titled “Dynamics loves Power Platform”. Just register at https://www.powerthon.info and take part in this great event. I also did my part to compensate for this…