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
MarkL.ax269MarkL.ax269 

Workflow - "Rule not evaluated"

I've got the following workflow rule on Opportunity and for some reason I'm getting the "Rule not evaluated" in the debug log whenever the triggering criteria is met.

Rule Criteria
(
Opportunity: Opportunity Record Type equals Online Marketing Opportunity RT)
or (Price Book: Price Book Name equals Online)

Evaluation Criteria
When a record is created, or when a record is edited and did not previously meet the rule criteria

I created a brand-new opportunity, setting the record type to "Misc Sales" and then I chose the Online Pricebook, but did not add any products.  When this happened I got the following log entry, and note the prior workflow rule has exactly the same criteria, just "Media" instead.

Code:
Rule Name: Media Opportunity Closed
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
[Opportunity : Opportunity Record Type equals Alternative Media Opportunity RT] OR
 [Price Book : Price Book Name equals Media]
Value found: 01260000000DKSA
Value found: Online
Criteria evaluates to false
[Opportunity: TEST Online Opp 0066000000AX04d]
Rule Name: New Online Opportunity
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
Rule not evaluated

So then I switched the Pricebook to "Media" thinking I'd see if there was a problem with the Online rule, and I got this log entry:
Code:
Rule Name: Media Opportunity Closed
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
Rule not evaluated
[Opportunity: TEST Online Opp 0066000000AX04d]
Rule Name: New Online Opportunity
Trigger type: ON_CREATE_OR_TRIGGERING_UPDATE
Evaluating Workflow Entry Criteria: 
[Opportunity : Opportunity Record Type equals Online Marketing Opportunity RT] OR
 [Price Book : Price Book Name equals Online]
Value found: 01260000000DKSA
Value found: Media
Criteria evaluates to false

Basically if my "Pricebook Name" criteria is met, the rule isn't evaluated.  This causes a big problem because I need to notify people when these types of opportunities are created.  Why in the world isn't the rule being evaluated?  It seems like Salesforce is just being fickle.  :)

Mark
 

 

MarkL.ax269MarkL.ax269
BTW I also subsequently added products to this opportunity and got the same result.  Whatever pricebook was selected, that rule ended up "not evaluated."  Thanks for any help.

Mark
MarkL.ax269MarkL.ax269
And a followup, I changed the rule criteria to "Every time a record is created or edited" and it fired perfectly, but I can't have it work that way.  So it looks like somehow using the Pricebook Name in the critieria doesn't "count" as a change, or that does count but that Salesforce thinks the opportunity "previously met the criteria," even when it didn't.

Mark
MarkL.ax269MarkL.ax269
FWIW here's the response I got from Salesforce.  Apparently the Pricebook cannot be used as a criteria because of the way Salesforce handles the IDs.  So it shouldn't even be an available option IMHO.

"I have reviewed your case and there is no possible way to use the price book as a reference for a criteria, since SF uses the same ID number for the price books, the only difference is the three letters at then that makes them different, so that is why you are not even allowed to run the report based on that criteria of the Price books"
bwacjaybwacjay
hmmm...

not very much help to be found on this topic, i see.

I'm trying to fire a workflow action on a text field value, and am also getting a "rule not evaluated" in my debug log. 

It sure would be nice to get some insight on this...
Arnt mongoDBArnt mongoDB
wow, 6 years later I run into the same problem (not with Pricebooks though). The explanation you got from support sounds like BS to me.
In my case there are no IDs involved. I suspect limitiations with cross-object references (in your example, it would be interesting to see if the conditions set up for the IDs instead of the Pricebook Name would have worked)
Tom FarringtonTom Farrington
And now another 3 years on.  As with lots of these things, its a simple answer.

The "WF_RULE_NOT_EVALUATED" happens as the criteria is set to 'created, and any time it's edited to subsequently meet criteria'.  You can edit the record as many times as you like, but it will only evaluate the workflow if a field change causes the criteria to be met when it WASN'T before.

In terms of the record ID issue that started this thread, I'd suggest maybe a custom checkbox on the opportunity record which is TRUE as default,  us this to trigger the workflow, and then clear the checkbox to FALSE once your actions have been completed.