In Salesforce, we create records with the help of forms, and these forms have various fields and components by adding Component Visibility, where we have to state conditions to control, such as whether a specific field is visible or not on a record page.
In Salesforce Screen flows, we can add conditional visibility to any specific field or component. In this Salesforce tutorial, we will learn to use and add Conditional visibility for components in Salesforce Screen flow.
Flow Conditional Visibility Considerations
For setting visibility for a screen component, there are the following considerations.
- The null value is always evaluated as an empty string.
- Operators like ‘Was Visited‘ and ‘Was Set‘ aren’t supported in conditional visibility.
- The Apex-defined data types and Record variables data types aren’t supported in conditional visibility, but you can reference attributes and fields.
- Any screen input component with Manually assign variables (advanced) selected isn’t available as a resource for conditional visibility on the same flow screen.
- Text that has merge fields included isn’t supported in values. Merge fields on their own are supported.
Create a Screen flow with Component Visibility in Salesforce
In this example, I will create a Screen flow to explain component visibility. With flow, we will create Account records, and there will be two address fields: Billing Address and Shipping address. We will add a condition: if the Shipping address is the same as the Bi