I wish to run a workflow once a day or once a week. How to set it up? If I make a Time-Dependent Workflow Action, it only allows me to fire it from a rule trigger date or date created or a couple of other options.

What to do?

  • Workflow rules fire on an event (record create or update basically) and cannot be scheduled. You will need to look into creating a schedulable class: salesforce.com/us/developer/docs/apexcode/Content/…. If you could provide more specific information on what you want to achieve we can provide a starting point for you. – Girbot Dec 17 '14 at 10:30
  • The WF is supposed to update a text field to a value that is in a roll up field. We would like that updated daily. Can a WF be scheduled to run once a day? If not, how to go about it? Thanks. – sf123 Dec 18 '14 at 9:52

One way you could do it is by chaining 2 workflow rules together with a field used as a flag in the criteria along with a date/time field that gets set to the day/time you want the rule to run next. Have your actual rule do the update and uncheck the flag field as well as set the date/time field for the next run. Have the second workflow rule recheck the field one hour after its been unchecked, make sure the field updates are set to reevaluate the workflow rules.
Although if you are mass updating records this is probably not the best way to go about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.