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
theHackneyPiratestheHackneyPirates 

Scheduling Workflow Rules

Hi, 

 

I am relatively new to salesforce and not a great coder so please bear in mind! I work for a small charity with limited resources trying to make good use of our Salesforce foundation licenses.

 

Is it possible to force workflow rules to be evaluated by changing a field through apex scheduling? I have set up quite a few workflow rules and thought that having a requirement "rule date = today" for example would be enough to trigger the workflow rule on a relevant day, but this does not seem to work. My idea is to create a checkbox for each lead called "rule trigger" and tell the rules to run when it is ticked, then find some apex code to do that daily and trigger the rules.

 

My issue at the most basic level is getting workflow rules to run daily so if there is some better way to do this feel free to point me in that direction. I found these instructions which seemed to imply it was possible to get rules to evaluate daily.

 

Thanks, 

 

Peter

digamber.prasaddigamber.prasad

Hi,

 

Looking at your requirement, sound time based workflow will suffice your requirement. Kindly go through below:-

 

https://help.salesforce.com/HTViewSolution?id=000005245&language=en_US

http://help.salesforce.com/HTViewHelpDoc?id=workflow_time_action_considerations.htm&language=en_US

 

Let me know if you have any specific question.

Forza di SognoForza di Sogno

Peter,

 

The instructions (URL link) you listed seem to address your requirement. 

 

When the lead checkbox is ticked, trigger the workflow to set the custom date field to today's date.

Then you have a second workflow rule with time-dependent actions that triggers off the custom date field being set to today, to take care of your daily actions.  One action could then be to untick the original lead checkbox, and another action (delayed by 1 day) to retick the lead checkbox.  This would then trigger the first workflow again.

 

To get the first-time run going, you could do an update data load, setting the lead checkbox to true/ticked.

 

I hope that helps.