Salesforce Fact #218 | Blank picklist value is actually NULL
Whenever we are setting any picklist field value to blank, it will get stored in database as NULL. So we need to be careful while processing this data after fetching from database.
In this example, we are creating an account in a test method with type as blank, and populating blank using single quotes instead of NULL. Now after we fetch the data from the database it is NULL, not blank.
Attached are the screenshots.
Comments
Post a Comment