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
Vignesh RamshettyVignesh Ramshetty 

How to create Countdown timer in apex class ?

Whenever any record is created in any object we want to run a timer if it reach 15 min then we want to perform business logic , Can any one help of creating this by apex class ?

 
HarshHarsh (Salesforce Developers) 
Hi Vignesh,
  • I don't believe Apex is necessary for this. Directly creating a lightning component allows you to take advantage of javascript setTimeOut or setInterval.
  • You can refer stack exchange link for a sample lightning component for the timer.
https://salesforce.stackexchange.com/questions/103844/examples-for-lightning-timer-component 
  • For More about javascript setTimeout please refer to the below link.
https://www.w3schools.com/js/js_timing.asp 

There is a salesforce forum link having a question related to the countdown timer you also can refer to it.

https://developer.salesforce.com/forums/?id=9060G0000005m3EQAQ

Please mark it as Best Answer if the above information was helpful.

Thanks.