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
Mahesh_BMahesh_B 

I have a workflow and wanted it to trigger only at a specific time

Hi There,
 
I have a workflow and wanted it to trigger only at a specific time, for example i have a workflow for a case and i get a notification when a case is logged thru web and its priority is high, now i want to implement that only at the time say 6:30 AM till 8:00 AM i need to the notification if it goes beyond that timeline no need for notification.
 
Is this possible if yes how can i set it up.
 
Thanks in advance
Mahesh.
werewolfwerewolf
Datetime functions in formula fields are pretty weak, so the only thing I can think of is to make a custom number field called TimeOpened.  Use an Apex before insert trigger to save a value to it.  That value would be a number between 0 and 1440 depending on what minute of the day the case was opened.  Then you could make your workflow rule criteria such that it only fires if it's opened between the pertinent times (minutes 390-480 in your case).
quadossquadoss

Hi,

Thank you for your valuable response, but as i'm not that well versed in Salesforce can you help me how to create a trigger and set it up for 390 - 480 time interval.

Thanks

Mahesh

HardhatHardhat
I'd recommend you download the Force.com cookbook, which describes Apex Code, a Java-like language, and how to apply it in triggers.