cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ufgeorge
Helper II
Helper II

Automation flow run before 7 days of a date parameter

I create a new date field in Dynamic CRM Account.

 

I am trying to add a new flow that can run 7 days before date store in this field and send an email.

 

But I really dont know how to write condition?

Please help, TKX.

 

George

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@ufgeorge 

I would add another calculated field .. 

Mira_Ghaly_0-1622373543415.png

Then you create a Recurrence flow that runs daily and Retrieves all records where Calculated Field = Today

You can use the List Rows Action with FetchXML

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

7 REPLIES 7
Mira_Ghaly
Dual Super User II
Dual Super User II

@ufgeorge 

I would add another calculated field .. 

Mira_Ghaly_0-1622373543415.png

Then you create a Recurrence flow that runs daily and Retrieves all records where Calculated Field = Today

You can use the List Rows Action with FetchXML

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly 

This is a good way.

But maybe a field to calculate how many days left...

Then I can use this field = 30 to send a email, =7 send another...

 

How to set calculate about this? utcNow() - datetime field?

@Mira_Ghaly 

I found I can use:

DiffInDays(NOW(), crb94_webschool_expire)

 

But there is a question.

now() shows date of my time zone.

But date stored in CRM is UTC.

How to correct it?

TKX.

Mira_Ghaly
Dual Super User II
Dual Super User II

@ufgeorge are you using Diffindays in power automate or as a calculated field?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly 

I use Diffindays in calc field.

It can only use utcNow() in Power Automate.

 

I don't know if I was wrong!

Can you tell me Now() returns utc time or local time?

Then I can decide how I can use it.

 

TKX.

 

George

Mira_Ghaly
Dual Super User II
Dual Super User II

@ufgeorge 

It will work as UTC Time

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly 

I see.

If result of Diffindays ()  is lower than 24hours, the result will show 0 because it is less than 1 day.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Top Kudoed Authors
Users online (5,248)