2

I have a Workflow on Leads, which is a formula (also tried as a Filter), the content:

Days_from_Creation__c = 1 && HasOptedOutOfEmail = False && My_Drip__c = null

This is from the debug log:

16:44:56.389 (3389165000)|WF_FORMULA|Formula:Days_from_Creation__c = 1 && HasOptedOutOfEmail = False && My_Drip__c = null|Values:Days_from_Creation__c=1, My_Drip__c=null, HasOptedOutOfEmail=0

16:44:56.389 (3389174000)|WF_CRITERIA_END|false

As you can see Criteria evaluates to False. I don't understand why. The only thing that is strange is that while HasOptedOutOfEmail is a standard field in Lead and is of type Checkbox (thus Boolean) it prints out that the value is 0 instead of False (in the log).

Any ideas?

2
  • What data type is My_Drip__c? I've found (multi) pick lists troublesome in the past. Aug 14, 2012 at 22:48
  • My_Drip__c is of type Date Aug 15, 2012 at 15:57

2 Answers 2

2

Replace My_Drip__C = null with Isblank(My_drip__c).

= null doesn't work well in WF rules. ISBlank(Field) is better than IsNull(Field). IsBlank supports more field types.

So your rule formula would be:

Days_from_Creation__c = 1 && HasOptedOutOfEmail = False && isblank(My_Drip__c)

2
  • I did that, and while it's the correct and recommended way, that was not the problem. Aug 15, 2012 at 15:55
  • @salesforce wizard, seems clear nulls are weird in comparisons, do you have any more guidelines about how they do work? i.e. null = <anything> is always false, and null <> <anything> is always false? running into this myself, see salesforce.stackexchange.com/q/48639/594, and figure if we know how "null" behaves we can work around this better than just blank value Sep 6, 2014 at 1:23
2

The problem was the fact that the WF was executing "When a record is created, or when a record is edited and did not previously meet the rule criteria". After I switched to "Every time a record is created or edited" it started working.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .