cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Recurrence Flow - Send An Email action for outstanding orders

Hi,

I want to create a flow that looks for orders in Dynamics 365 where my custom date field (invoiceDate) contains data and is before todays date but where the status is not "Invoiced", and then send an email to the owner of said order.

This is the query in Dyn 365

Capture.PNG

 

My main problem is the Filter Query. I'm struggling to create a query to check the invoice date as above. This is as far as I've got

Capture2.PNG

 

Any help would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Recurrence Flow - Send An Email action for outstanding orders

Hi @wenners68 

If you are planning on using Flow with Dynamics quite a lot I highly recommend the XRM Toolbox (https://www.xrmtoolbox.com/). This has a plugin tool that allows you to connect to your instance of Dynamics 365 and create the fetch xml (either using the UI or by downloading and copying from your advanced find query) for testing. Once you are happy with your query, the tool generates the filter criteria needed for Flow which you then just copy into your Flow action.

 

The example shown below generated the following filter criteria (which you can edit for your needs if required once you have found the logical name of your invoice date)

 

statecode eq 0 and actualend ne null and Microsoft.Dynamics.CRM.OlderThanXDays(PropertyName='actualend',PropertyValue=1)

 

XrmToolBox_2019-06-25_15-46-38.png

 

On a side note, the Dynamics 365 connector that you are using is deprecated (see the last section of this post https://flow.microsoft.com/en-us/blog/nine-new-connectors-in-april-and-improved-visibility-into-trig...).

I would make use of the Common Data Service connector instead as this is the replacement and can support more data types and broader trigger scenarios.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: Recurrence Flow - Send An Email action for outstanding orders

Hi @wenners68 

 

You can simply use and and extend the query to get the data when the Invoice Date fields matches the critereia. You will have to get to know the logical name of the field here. and with the current filter query, just add -> and logicalfieldname ge ticks(addDays(utcnow(),X))

 

you can refer to this blog for more details on ODATA queries : 

https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-filtering-with-odata/

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Super User
Super User

Re: Recurrence Flow - Send An Email action for outstanding orders

Hi @wenners68 

If you are planning on using Flow with Dynamics quite a lot I highly recommend the XRM Toolbox (https://www.xrmtoolbox.com/). This has a plugin tool that allows you to connect to your instance of Dynamics 365 and create the fetch xml (either using the UI or by downloading and copying from your advanced find query) for testing. Once you are happy with your query, the tool generates the filter criteria needed for Flow which you then just copy into your Flow action.

 

The example shown below generated the following filter criteria (which you can edit for your needs if required once you have found the logical name of your invoice date)

 

statecode eq 0 and actualend ne null and Microsoft.Dynamics.CRM.OlderThanXDays(PropertyName='actualend',PropertyValue=1)

 

XrmToolBox_2019-06-25_15-46-38.png

 

On a side note, the Dynamics 365 connector that you are using is deprecated (see the last section of this post https://flow.microsoft.com/en-us/blog/nine-new-connectors-in-april-and-improved-visibility-into-trig...).

I would make use of the Common Data Service connector instead as this is the replacement and can support more data types and broader trigger scenarios.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

Highlighted
New Member

Re: Recurrence Flow - Send An Email action for outstanding orders

Perfect! That's really handy and I already use XrmToolbox but had never seen that option before. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,536)