You need to sign in to do that
Don't have an account?
Steve Cairney
WFR Fires, but Time Based Action doesn't.
Hi, I have a WFR with the following rules with the evaluation criteria created and edit
(Opportunity: Stage EQUALS Closed Won) AND (Opportunity: Booked GREATER OR EQUAL 1) AND (Opportunity: Live Alert EQUALS False)
The immediate action is to Field Update and there is a time dependant action of an email alert set to fire 1 day before the value of a date field.
This is no longer working (it used to) so I fired up the debug logs and edited a record so that it was out of the criteria, then back in the criteria. What I noticed was the field update worked (normally how I tell if a WFR is working or not) but the time dependent action is not in the time-based-workflow monitor.
The last time this happened it was because of a change in the SF seaosn release but so far I can't crack this egg again using the same workaround.
Can anyone point me in the direction of working out why this has happened and why the field update would work but not the time based action. Hopefully I'll be able to make some progress fixing this.
(Opportunity: Stage EQUALS Closed Won) AND (Opportunity: Booked GREATER OR EQUAL 1) AND (Opportunity: Live Alert EQUALS False)
The immediate action is to Field Update and there is a time dependant action of an email alert set to fire 1 day before the value of a date field.
This is no longer working (it used to) so I fired up the debug logs and edited a record so that it was out of the criteria, then back in the criteria. What I noticed was the field update worked (normally how I tell if a WFR is working or not) but the time dependent action is not in the time-based-workflow monitor.
The last time this happened it was because of a change in the SF seaosn release but so far I can't crack this egg again using the same workaround.
Can anyone point me in the direction of working out why this has happened and why the field update would work but not the time based action. Hopefully I'll be able to make some progress fixing this.
So I guess now I need to delay the booked checkbox WFR. I'll add a time-dependant action to it and see how it goes.
All Answers
Setup | Monitor | Time-Based Workflows -- click Search without criteria
I'm wondering if these are all connected somehow.
Time-dependent actions remain in the workflow queue only as long as the workflow rule criteria are still valid. If a record no longer matches the rule criteria, Salesforce removes the time-dependent actions queued for that record.
For example, an opportunity workflow rule can specify:A criteria set to “Opportunity: Status not equals to Closed Won, Closed Lost”
An associated time-dependent action with a time trigger set to 7 days before the opportunity close date
If a record that matches the criteria is created on July 1 and the Close Date is set to July 30, the time-dependent action is scheduled for July 23. However, if the opportunity is set to “Closed Won” or “Closed Lost” before July 23, the time-dependent action is removed from the queue.
https://help.salesforce.com/HTViewHelpDoc?id=workflow_time_action_considerations.htm&language=en_US
Here's the lowdown on the criteria.
There is a related object called Media Cost. When this related object is booked a formula field on the Opp tallies up how many have been booked.
As we know, a forumula field update won't trigger a WFR, so if the formula field is >= 1 another WFR on the Opp object will set a checkbox (is_booked__c) to TRUE.
This is the criteria to fire the WFR. This is the content
Live Alert
Rule Name Opp Live Date Object Opportunity
Evaluation Criteria Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria
Rule Criteria Is_booked__c = TRUE
Immediate actions:
Task: Live Alert Email Sent to Planner (so I can see if it's working)
Field Update: Live alert (set to TRUE)
This is a checkbox. The idea behind this is if it's set to TRUE I can add that to the criteria so the email alert isn't sent more than once.
Time dependant actions. This is based on a Date feild called Campaign Live Date. (on my test record this is in the future)
Email Alert 1 Day before "Campaign Live Date".
Now here's the results from the test record. I edited it to not meet the criteria, then checked the booked field on the related object. As you can see the WFR to update the is_booked__c feild works.
But the Live Alert WFR is evaluated but as FALSE.
If you look at the debug logs for the Live WFR, you can see that it is_booked__c was evaluated as '0' when in fact it should be '1'.
This is a real headscratcher since it DID work for a few weeks until Winter 2016 release.
The issue was the order of execution of the worfkflows. The second workflow evaluates first causing it to fail / not met the criteria because obviously the first worklfow hasn't performed it's process yet. You might want to check this kind of scenario.
Out of interest, did you overcome your problem, and if so how?
So I guess now I need to delay the booked checkbox WFR. I'll add a time-dependant action to it and see how it goes.