The below before-save Flow (fast-field updates) seems to be automatically handling NULL values. I was assuming that I would have to perform a null check on the Get Org element or else I would run into an exception, but this is not happening and the Flow finishes without error.

I have two questions associated with this:

1) Why does this Flow 'bypass' the expected null exception error and successfully complete?

2) What documentation is there that gives further information on this?

Flow (auto-layout)

Debug log of Get Org element

Debug log of Assign Org Name (slug) element

1 Answer 1


I'm not sure that this behavior is well-documented, but it actually comes from the expression engine that is used universally to handle formulas. In other words, whether you're using Visualforce, Workflow Rules (deprecated), a formula field, a Weblink (custom button or link URL), Validation Rules, Flows, etc, you should have exceptionally consistent behavior with formulas.

One such behavior is that null values don't faze it. It simply carries on as if the entire value is null, except in some areas, where you can choose to treat nulls as nulls or 0. For example, consider this Visualforce page:

<apex:page standardController="Contact">

If Account is null, we get the output "Hello". No null pointer exceptions here. This is also true anywhere classic formulas are supported, which is in a ton of different places in Salesforce (notably, Aura and Lightning Web Components don't support evaluating formulas).

Of course, it's still possible to get the "SObject row was retrieved via SOQL without querying the requested field" error if you manually select fields, then try to access a field you didn't add, but you have to go out of your way to set up that failure condition. But, null values are generally not a problem for Flows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .