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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,826)