Salesforce Fact #119 | Ternary limitation

Suppose, we have to get the reference of an account/contact object based on a condition check. We cannot use the ternary operator for this scenario as the two return types must be compatible.

So we can either cast the two object as SObjects or use the traditional if else structure to achieve the same.

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