Salesforce Fact #79 | Date comparison in Flow
Suppose there is a use case that we need to fetch the account records created in last 7 days inside lightning flow. Now we need to put our filter considering CreatedDate field.
Now, the createddate field is of type datetime. However, it can be compared against a date value if we use a formula value. For this scenario, we would create a date type formula variable which will store: {!$Flow.CurrentDate}-7 as we need to fetch last 7 days records. This value can be used in the filter condition of GetRecords element and records can be retrieved successfully.
Attached are the screenshots.
Comments
Post a Comment