Saturday, May 7, 2011

Bug (?) with ISNULL() Function in Validation Rules

I tried to setup a simple validation rule today in my sandbox to enforce the presence of a value in a Lookup field.

My first attempt for the error formula was:
ISNULL( Source_Program__c )

However, this turned out not to work at all. Whether a value was in the field or not, the formula never generated a validation error.

Then, I switched over to an even more basic formula:
Source_Program__c = null

This worked like a charm. Am I missing something here?