Time-Based Workflow Not Working! - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Arni AdamsArni Adams 

Time-Based Workflow Not Working!

I have created a time-based workflow to send an email notification to contract owners 3 months prior to the contract expiry date.

I've done this before with a 6-month notification for contracts.  But when I look into the time-based workflow jobs, I don't see the 3-month notifications.

I've also "updated" the contracts using DataLoader, but still no luck.  What am I missing?Snapshot of Workflow
Best Answer chosen by Arni Adams
Mayank SrivastavaMayank Srivastava
Arni,
For the time based workflow rule action to show up in the time-based workflow jobs queue (in your case), the records must be changed in a manner where the Rule criteria evaluates to False and then to True. Only then the actions wil queue up.
Moreover, since you created the Workflow Rule today, the actions will only be queued up for records created after the workflow creation date/time. 

Try doing the following:

1. Go into a record that you want to get queued up in the job queue.
2. Make sure the Rule criteria evaluates to False. If it doesn't, then change Owner or Status to make it evaluate to False.
3. Now again change the Owner or Status to make the Rule criteria evaluate to True.
4. Go check the Time based workflow job queue.

If the action now shows up, you need to basically do the same using the Data Loader. The records that already meet the criteria won't simply trigger the WFR if you update them using Data Loader.

For mass queueing up of the records, do this:

1. Export all records that need to be updated.
2. Create a checkbox field as default = Unchecked
3. Add the following to the workflow rule: 
Contract Owner equals   ----- AND
Contract Status equals    ----- AND
Checkbox Field = TRUE
4. Before the update operation, include the Checkbox field column with a TRUE value for all records that need to be updated.
5. This will cause the WFR to now fire across all records.
6. Once you are done with the above, go to the Time based workflow queue and ensure that the actions now show up.
7. Get rid of the checkbox field and its role in the workflow rule.
 

All Answers

Mayank SrivastavaMayank Srivastava
Arni,
For the time based workflow rule action to show up in the time-based workflow jobs queue (in your case), the records must be changed in a manner where the Rule criteria evaluates to False and then to True. Only then the actions wil queue up.
Moreover, since you created the Workflow Rule today, the actions will only be queued up for records created after the workflow creation date/time. 

Try doing the following:

1. Go into a record that you want to get queued up in the job queue.
2. Make sure the Rule criteria evaluates to False. If it doesn't, then change Owner or Status to make it evaluate to False.
3. Now again change the Owner or Status to make the Rule criteria evaluate to True.
4. Go check the Time based workflow job queue.

If the action now shows up, you need to basically do the same using the Data Loader. The records that already meet the criteria won't simply trigger the WFR if you update them using Data Loader.

For mass queueing up of the records, do this:

1. Export all records that need to be updated.
2. Create a checkbox field as default = Unchecked
3. Add the following to the workflow rule: 
Contract Owner equals   ----- AND
Contract Status equals    ----- AND
Checkbox Field = TRUE
4. Before the update operation, include the Checkbox field column with a TRUE value for all records that need to be updated.
5. This will cause the WFR to now fire across all records.
6. Once you are done with the above, go to the Time based workflow queue and ensure that the actions now show up.
7. Get rid of the checkbox field and its role in the workflow rule.
 
This was selected as the best answer
Arni AdamsArni Adams
Ahh, I remember now!  I went ahead and did a mass update to the contracts, changing the ownership to someone else so the criteria met is FALSE.  Then I did another mass update, changing the ownership back to the correct person so that the criteria becomes TRUE.

THANK YOU, THANK YOU!