You need to sign in to do that
Don't have an account?
Kathleen Elisabeth Smith
Reference formula for yesterday's dateTime in the Start Trigger
Hello, I have a Scheduled Trigger on a custom object. I want the flow to only run on records that were created after yesterday's Date/Time. To do this, I created a Date/Time variable that grabs today's date, then I created a formula that takes the variable and subtracts 1, to make it yesterday. Then I go to the start object and put in the conditions "CreatedDate Greater Than or Equal (Yesterday's Date)". However, no matter what I put in for yesterday's date (my formula, date/time straight from the global flow value, etc.) it doesn't accept my field. It either gives me a "We don't recognize that value. Make sure it's a valid date/time value in this format: M/d/yyyy h:mm a" or error that says "The Start element can’t have a record filter condition that references a resource or element. Remove the condition that contains the unsupported value “$Flow.CurrentDateTime” or replace it with a literal value." How do I work around this so that I can get my flow to only run on records that were greated yesterday?
Thank you!
Thank you!
Greetings!
Have you used the formula as below to get the Yesterday's date to compare it with the Createddate field.
Reference:https://help.salesforce.com/articleView?id=tips_for_using_date_datetime_formula_fields.htm&type=5
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
Seems to say it is a limitation of scheduled flows for right now.
https://help.salesforce.com/s/articleView?id=000356305&type=1 (https://help.salesforce.com/s/articleView?id=000356305&type=1)
Ex:
If(
Connected_Date__c = TODAY() - (1) , TRUE, FALSE
)
Date YesterdayDate = Date.TODAY() + (-1);