Loading
Prepare for Email to Become the Default Login ExperienceRead More
Ongoing maintenance for Salesforce HelpRead More
Extend Salesforce with Clicks, Not Code
NULLVALUE

NULLVALUE

Determines if an expression is null (blank) and returns a substitute expression if it is. If the expression is not blank, returns value of the expression.

Important
Important Use BLANKVALUE instead of NULLVALUE in new formulas. BLANKVALUE has the same functionality as NULLVALUE, but also supports text fields. Salesforce continues to support NULLVALUE, so you don’t need to change existing formulas.

Use

NULLVALUE(expression, substitute_expression) and replace expression with the expression you want to evaluate; replace substitute_expression with the value you want to replace any blank values.

Tips

  • Avoid using this function with text fields because they are never null even when they are blank. Instead, use the BLANKVALUE function to determine if a text field is blank.
  • Don’t use NULLVALUE for date/time fields.
  • Choose Treat blank fields as blanks for your formula when referencing a number, percent, or currency field in a NULLVALUE function. Choosing Treat blank fields as zeroes gives blank fields the value of zero so none of them are null.
  • Use the same data type for both the expression and substitute_expression.
Custom Field Example
Custom Field Example (NULLVALUE(Sample_Due_Date__c, StartDate +5)

This formula returns the date five days after the start date whenever Sample Due Date is blank. Sample Due Date is a custom date field.

 
Loading
Salesforce Help | Article