superBoxLWC
A collection of Salesforce Lightning Web Components (LWC) that provide enhanced picklist selection capabilities with custom help text definitions for Flow screens.
About
SuperBox LWC Components
A collection of Salesforce Lightning Web Components (LWC) that provide enhanced picklist selection capabilities with custom help text definitions for Flow screens.
Components Overview
This package includes two main components:
- superListBoxLWC - Multi-select picklist with dual listbox interface
- superComboboxLWC - Single-select picklist with dropdown interface
Both components feature:
- Dynamic picklist value loading from any Salesforce object
- Custom help text definitions for each picklist value
- Custom Property Editors (CPE) for easy configuration in Flow Builder
- Inline help tooltips showing definitions when hovering over values
Component Details
superListBoxLWC (Multi-Select)
A Flow-enabled component that displays a dual listbox for selecting multiple picklist values, with optional help text definitions for each value.
Features
- Dual Listbox Interface: Available/Selected columns with move buttons
- Custom Help Tooltips: Displays help text icons next to values when definitions are provided
- Dynamic Field Loading: Loads only multi-select picklist fields from the selected object
- Dual Output Formats: Returns selections as both string and collection
Input Properties
objectApiName(String, Required): The API name of the Salesforce objectfieldApiName(String, Required): The API name of the multi-select picklist fieldrecordTypeId(String, Optional): Record Type ID to filter picklist valuescardTitle(String): Label displayed on the component card (default: "Select Values")isRequired(Boolean): Whether selection is requiredinitialSelectedValues(String[]): Pre-selected valuespicklistDefinitions(String): JSON string containing value definitions
Output Properties
selectedAsString(String): Selected values as semicolon-separated stringselectedAsCollection(String[]): Selected values as string collection
superComboboxLWC (Single-Select)
A Flow-enabled component that displays a dropdown combobox for selecting a single picklist value, with inline help icons in the dropdown.
Features
- Custom Dropdown: Shows help icons directly in the dropdown next to each option
- Hover Tooltips: Help text appears when hovering over the info icons
- Dynamic Field Loading: Loads only single-select picklist fields from the selected object
- Clean Interface: Standard combobox when no definitions, enhanced UI with definitions
Input Properties
objectApiName(String, Required): The API name of the Salesforce objectfieldApiName(String, Required): The API name of the single-select picklist fieldrecordTypeId(String, Optional): Record Type ID to filter picklist valuescardTitle(String): Label displayed on the component (default: "Select Value")placeholder(String): Placeholder text for the dropdown (default: "Choose a value")isRequired(Boolean): Whether selection is requiredinitialSelectedValue(String): Pre-selected valuepicklistDefinitions(String): JSON string containing value definitions
Output Properties
selectedValue(String): Selected value as string
Custom Property Editors (CPE)
Both components include custom property editors that provide an intuitive configuration experience in Flow Builder:
Features
- Object Selection: Dropdown list of all accessible Salesforce objects
- Field Selection: Filtered list showing only appropriate picklist fields (multi-select or single-select)
- Definition Editor: Interface to add custom help text for each picklist value
- Live Preview: Changes are reflected in the Flow Builder preview (deploy required for full update)
How to Use CPE
- Add the component to a Flow screen
- Click the component to open its configuration
- Select the target object from the dropdown
- Select the appropriate picklist field
- Define help text for each picklist value in the definitions section
- Configure other properties as needed
Installation
Clone this repository:
git clone https://github.com/Marceswan/superBoxLWC.gitDeploy to your Salesforce org:
sf project deploy start
Usage in Flow
For Multi-Select (superListBoxLWC)
- In Flow Builder, add a Screen element
- Drag the "Super List Box LWC" component onto the screen
- Configure using the custom property editor:
- Select Object (e.g., "Account")
- Select Multi-Select Field (e.g., "Products__c")
- Add help text definitions for values
- Store outputs in Flow variables
For Single-Select (superComboboxLWC)
- In Flow Builder, add a Screen element
- Drag the "Super Combobox LWC" component onto the screen
- Configure using the custom property editor:
- Select Object (e.g., "Account")
- Select Single-Select Field (e.g., "Type")
- Add help text definitions for values
- Store output in a Flow variable
Architecture
Components Structure
force-app/main/default/
āāā lwc/
ā āāā superListBoxLWC/ # Multi-select component
ā āāā superListBoxCPE/ # Multi-select property editor
ā āāā superComboboxLWC/ # Single-select component
ā āāā superComboboxCPE/ # Single-select property editor
ā āāā stringArrayCombobox/ # Collection variable selector
ā āāā stringArrayUtils/ # Utility functions for stringArrayCombobox
āāā classes/
āāā SuperListBoxController.cls # Apex controller for dynamic data
āāā SuperListBoxControllerTest.cls # Test class with 90%+ coverage
Key Technical Features
- Wire Adapters: Uses Lightning Data Service for picklist values
- Dynamic Apex: Controller methods to fetch objects and fields
- Reactive Properties: Real-time updates when configuration changes
- Custom UI Rendering: Switches between standard and enhanced UI based on definitions
- Collection Variable Support: stringArrayCombobox enables Flow collection variable selection
Development
This is a standard SFDX project structure. To work with these components:
- Ensure you have Salesforce CLI installed
- Authorize your org:
sf org login web - Make changes to component files
- Deploy changes:
sf project deploy start - Test in Flow Builder
Running Tests
# Run Apex tests
sf apex test run --test-level RunLocalTests
# Check code coverage
sf apex test report --test-run-id <test-run-id>
Best Practices
- Performance: The components efficiently load only the required picklist values
- Security: Respects field-level security and object permissions
- Accessibility: Includes proper ARIA labels and keyboard navigation
- Maintainability: Clean separation between UI components and property editors
Troubleshooting
Common Issues
- Fields not showing: Ensure the user has access to the object and fields
- Definitions not appearing: Check that definitions are properly formatted JSON
- CPE not loading: Verify all components are deployed together
- Collection variable errors: Ensure stringArrayCombobox and stringArrayUtils are deployed
- Initial values not setting: Use Flow variable references (e.g., {!variableName}) for collections
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Reviews (1)
Details
- Author
- Marc Swan
- Category
- LWC Component
- Published
- Feb 13, 2026