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

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow