You need to sign in to do that
Don't have an account?
Smurfet15
i need to run a flow based on the schedule time?
Hi Guro,
Here is my exact requirement, we have a flow but we need to fire this 30 days before the contract end date.
Is this possible only in Apex classe if yes can you please send a sample classe on this.
And also i need this Apex Class to run every day, so do we need to Apex Scheduler on this?
Thanks in Advace
Sumerfet
Here is my exact requirement, we have a flow but we need to fire this 30 days before the contract end date.
Is this possible only in Apex classe if yes can you please send a sample classe on this.
And also i need this Apex Class to run every day, so do we need to Apex Scheduler on this?
Thanks in Advace
Sumerfet
You can schedule the batch class to run in daily basis at particular time using Apex Scheduler.
Check this below link for more details on batch class - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm
Useful blog post - http://blog.shivanathd.com/2013/01/how-to-write-batch-class-in.html
Apex Scheduler - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm
Here is one of my utilities that I use to schedule. I have simplified it a great deal for example purposes, but you should be able to get the gist:
Here is the test class (modified a bit) that would work with it (also, it's 2 years old before some of the new bells and whistles came out)
Hope that helps!
Thanks for the sample code.
Can I have the "class UtilityHourlySchedule"? My guess is this is where the setting for Schedule job.
Thanks,
Mary