function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Siana DcruzSiana Dcruz 

How to reset counter on the beginning of each day!!

Hey all,
I wanted help to reset counters.The requirement is I have a method which when called will increment the counter.The counter has to reset to 01 on the beginning of every day and then increment accordingly. I would be really gratefull if anyone helps me in building this logic.
Thanks!!
Tejas KardileTejas Kardile
Hi Siana,

Please see if below logic can help you here:

Create below fields:
  • Counter
Write time base workflow to reset counter i.e. 1 Day After Rule Trigger Date which will reset the counter on every day basis.

Also use and maintain this counter in your code.

Hope this will help you.

Thanks,
Tejas Kardile