cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tangi12
Level: Powered On

Dynamics CRM Connector - ODATA Filters and Owner Name

Hi!

 

I am at a complete loss on how to get this to work.  My ultimate goal is to send an email to owners when their opportunities are past due.

 

1. I connected to DCRM to get a list.

2. I want to filter the data on past due opps only. In ODATA filter I entered: Est. Close Date ge '" + today.toISOString() + "' but this is not working.

3. When I add the owner and account in my email it returns the ID instead of the name. I can't figure out how to change it.

 

Thanks for your help on this!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamics CRM Connector - ODATA Filters and Owner Name

Hi @Tangi12,

 

Could you please share a screenshot of your flow's configuration?

Do you want to filter opportunities are past due with the OData query within Filter Query field of "List records" action?

 

I think there is something wrong with the formula that you provided within Filter Query field of "List records" action, I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow trigger button.
  • Add a "List records" action, specify Organization Name, Entity Name set to Opportunities. Filter Query field set to following formula:

 

estimatedclosedate lt utcNow(...)

13.JPG

Note: The utcNow(...) is a WDL expression, the details of the formula as below:

utcNow('yyyy-MM-dd')
  • Add a "Apply to each", input parameter set to output of "List records" action.
  • Within "Apply to each", add a "Get record" action, specify Organization Name, Entity Name set to Accounts, Item identifier field set to Account dynamic content of "List records" action.

         Add a "Get record 2" action, specify Organization Name, Entity Name set to Users, Item identifier field set to Owner dynamic content of "List records" action.

 

        Add a "Send an email" action, To field set to Email dynamic content of "Get record" action, type the Account Name dynamic content of "Get record" action and the Full Name dynamic content of "Get record 2" action within Body field of "Send an email" action.

 

Image reference:14.JPG

 

15.JPGThe flow works successfully as below:16.JPG

Actually, the Account property within a opportunity is a Lookup type column, it searches for corresponding account within Accounts entity via a series of string like a GUID, such as, the '69500a5d-370a-e811-811d-70106fa93fc1'. The "List records" action UI just translate the GUID string into a friendly name within Dynamic content tab (Account dynamic content). The same reason on Owner dynamic content.

 

More details about WDL expression, please check the following article:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Dynamics CRM Connector - ODATA Filters and Owner Name

Hi @Tangi12,

 

Could you please share a screenshot of your flow's configuration?

Do you want to filter opportunities are past due with the OData query within Filter Query field of "List records" action?

 

I think there is something wrong with the formula that you provided within Filter Query field of "List records" action, I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow trigger button.
  • Add a "List records" action, specify Organization Name, Entity Name set to Opportunities. Filter Query field set to following formula:

 

estimatedclosedate lt utcNow(...)

13.JPG

Note: The utcNow(...) is a WDL expression, the details of the formula as below:

utcNow('yyyy-MM-dd')
  • Add a "Apply to each", input parameter set to output of "List records" action.
  • Within "Apply to each", add a "Get record" action, specify Organization Name, Entity Name set to Accounts, Item identifier field set to Account dynamic content of "List records" action.

         Add a "Get record 2" action, specify Organization Name, Entity Name set to Users, Item identifier field set to Owner dynamic content of "List records" action.

 

        Add a "Send an email" action, To field set to Email dynamic content of "Get record" action, type the Account Name dynamic content of "Get record" action and the Full Name dynamic content of "Get record 2" action within Body field of "Send an email" action.

 

Image reference:14.JPG

 

15.JPGThe flow works successfully as below:16.JPG

Actually, the Account property within a opportunity is a Lookup type column, it searches for corresponding account within Accounts entity via a series of string like a GUID, such as, the '69500a5d-370a-e811-811d-70106fa93fc1'. The "List records" action UI just translate the GUID string into a friendly name within Dynamic content tab (Account dynamic content). The same reason on Owner dynamic content.

 

More details about WDL expression, please check the following article:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 122 members 3,535 guests
Please welcome our newest community members: