Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am just wondering what could be differences between ISBLANK and ISNULL. I found following link

But I think ISNULL works on text fields. What you guys think? Which one is to be used?

share|improve this question
up vote 23 down vote accepted

Per the documentation, ISBLANK() should be used instead of the legacy ISNULL(). The biggest difference having to do with text fields.

Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.

This is further explained by,

Text fields are never null, so using ISNULL() with a text field always returns false. For example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field. For text fields, use the ISBLANK function instead.

share|improve this answer

I think it's likely to depend on the scenario in question, but you should be aware that ISNULL does not work the same way as ISBLANK for text.

When dealing with text and lookup fields, a blank value in the field yields true for ISBLANK() but false for ISNULL()—even if you set a text field to null in apex it is still treated as blank (i.e. not null) in the formula.

Essentially the system works the same way as you'd expect in a programming language: an empty string is not the same as a null value, it is still an instance of a string.

share|improve this answer

Always use ISBLANK() for fields with non-numeric values. and use ISNULL() for numeric value fields.

share|improve this answer
The documentation cited by Mikey above clearly states that ISNULL has essentially been deprecated and should not be used in new work. – Mike Chale Jun 16 '13 at 21:20
I Only answered the question in brief. – Ashraf Abusada Jun 18 '13 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.