You are here:
Add the Criteria-Based Search and Filter Component to Screen Flows
Embed the Criteria-Based Search and Filter component into guided Screen Flow processes. Users can search and filter records mid-flow, select one or more results, and pass the selected record IDs to subsequent flow steps for downstream processing, record creation, or automation.
Required Editions
| Available in: Lightning Experience |
| Available in: Automotive Cloud, Consumer Goods, Health Cloud, Manufacturing Cloud, Nonprofit Cloud, Nonprofit Cloud for Grantmaking, and Public Sector Solutions. View edition availability. View edition availability. |
| User Permissions Needed | |
|---|---|
| To add a component to a screen flow: | Manage Flow |
| To add a Criteria-Based Search and Filter component to a screen flow: | Use Criteria-Based Search and Filter system permission |
- In Flow Builder, add or open a Screen element in your flow.
- From the Components panel, drag Criteria-Based Search and Filter Intake onto the screen canvas.
-
Configure the component properties:
- Search Configuration (Required): Enter the API name of an active SearchCriteriaConfiguration metadata record (e.g., VehicleInventorySearch). This configuration defines search criteria, filters, and result display. You can reuse configurations from App, Home, or Record pages.
- Search Context (Optional): Provide JSON to prefill and optionally lock filter fields. Use this to carry forward selections from earlier flow screens (e.g., customer, location, work order). See sample structure below.
- Maximum Selection (Optional): Enter a number to cap how many records users can select. Leave blank for unlimited selection. Set to 1 for single-record selection. When the limit is exceeded, users see a warning toast. Clicking Next while over the limit displays an error and keeps users on the screen. This setting automatically disables "Select all across pages" to prevent exceeding the cap.
For additional considerations, including search result limits and maximum selection, see Considerations for Using Criteria-Based Search and Filter.
- Connect the Selected Record IDs output variable (a JSON-encoded string of record IDs) to a Text flow variable for use in later screens, Apex actions, or record-create elements. To use the IDs as a collection (for example, in a record-create loop), parse the JSON string first.
- Save and activate your flow.
Example
Sample Search Context JSON
{
"searchCriteria": [
{
"searchCriteriaFieldName": "ExteriorColor",
"searchFieldCriteriaValueList": [
"Red"
]
}
],
"readOnlyFields": [
"ExteriorColor"
]
}Note
- searchCriteriaFieldName: API name of the filter field from your search configuration
- searchFieldCriteriaValueList: Array of values to prefill (supports multiple values for multi-select fields)
- readOnlyFields: Array of field API names that users cannot modify on the screen
The Search Context JSON allows you to create dynamic, context-aware search experiences where earlier flow decisions constrain or guide the search criteria.
本文章是否解决您的问题?
请与我们共享您的想法,以便我们进行改进!
