
Announcements
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!!!
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:
estimatedclosedate lt utcNow(...)
Note: The utcNow(...) is a WDL expression, the details of the formula as below:
utcNow('yyyy-MM-dd')
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:
The flow works successfully as below:
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