1

I would like to get all the opportunities created yesterday. So, my formula variable "Yesterday" is as follow: ( {!$Flow.CurrentDate} - 1 ). However, when I added this variable into the opportunity filter condition, CreatedDate equals "Yesterday". It does not return any opportunities and I'm expected 4, which I created with createddate equals to "Yesterday". Created date is my only filter criteria.

Is my "Yesterday" formula correct? Thank you in advance.

1 Answer 1

1

The $Flow.CurrentDate returns a Date, and the CreatedDate on your Opportunity is a DateTime. So first you might think you just need to match them up - but it appears you cannot do these sorts of date comparisons in flow conditions as per:

https://trailblazer.salesforce.com/ideaView?id=0873A000000PcZ1QAK

So the workaround they recommend is to create a checkbox formula field on the Opportunity (in your case) which is checked when your condition is true (CreatedDate is yesterday).

Then in your flow, check that this checkbox is true.

1
  • Thank you for you feedback. Much appreciated it.
    – user7123
    Mar 7, 2021 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .