Salesforce Fact #165 | Get Records for specific date in lightning flow
Working with dates in lightning flow is always troublesome. If we use the DATETIMEVALUE() function it considers the GMT time, not the logged in user's local time. But we can get records for a particular date with some tweaks of formula fields.
Suppose, we are interested to find out how many Account, Contact & Lead records were created on a particular day based. So, in this case we have to check against the createddate of the records. So, we can create two datetime formula variables to store start datetime and end datetime accordingly and use the same in the Get Records.
Note: Here I have considered the time 5.5 hours less to match with the GMT time since I am in IST time. It can also be made configurable.
Attached are the screenshots.
Comments
Post a Comment