Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ISNULL #24

Closed
leifg opened this issue Mar 18, 2016 · 1 comment
Closed

Implement ISNULL #24

leifg opened this issue Mar 18, 2016 · 1 comment

Comments

@leifg
Copy link
Owner

leifg commented Mar 18, 2016

https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_functions_i_z.htm&language=en_US#ISNULL

@paustint
Copy link

The Salesforce docs appear to be updated and provide some additional context about how to treat certain data types.
(although the very first sentence gives me pause "Text fields are never null"? WTF?)

https://help.salesforce.com/s/articleView?id=sf.customize_functions_isnull.htm&type=5

  • Text fields are never null, so using this function 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.
  • Multi-select picklist fields are never null in s-controls, buttons, and email templates, so using this function with a multi-select picklist field in those contexts always returns false.
  • Empty date and date/time fields always return true when referenced in ISNULL functions.
  • Don’t use ISNULL for date/time fields.
  • Choose Treat blank fields as blanks for your formula when referencing a number, percent, or currency field in an ISNULL function. Choosing Treat blank fields as zeroes gives blank fields the value of zero so none of them will be null.
  • Merge fields can be handled as blanks, which can affect the results of components like s-controls because they can call this function.
  • When using a validation rule to ensure that a number field contains a specific value, use the ISNULL function to include fields that do not contain any value. For example, to validate that a custom field contains a value of '1', use the following validation rule to display an error if the field is blank or any other number:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants