Skip to content

Conversation

@AndyHaas
Copy link
Collaborator

@AndyHaas AndyHaas commented Oct 2, 2025

  • Add picklist integration to fsc_dualListBoxCPE component

    • New picklist properties (usePicklistValues, objectApiName, fieldApiName)
    • New data source option for Salesforce picklist fields
    • New event handlers for object and field selection
    • New getter methods for picklist mode detection
    • New renderedCallback method for flow combobox initialization
  • Add picklist integration to fsc_dualListBox3 component

    • New API properties for picklist configuration
    • New wire methods for object info and picklist values
    • New tracked properties for picklist data management
    • New updateOptionsFromPicklist method
    • New event handlers for picklist property changes
  • Add HTML template updates for picklist configuration UI

    • New picklist configuration section with object and field selectors
    • Conditional rendering based on picklist mode
  • Update utility files and metadata as needed

This enhancement allows users to select Salesforce objects and multipicklist fields to dynamically populate dual list box options directly from Salesforce metadata.

- Add picklist integration to fsc_dualListBoxCPE component
  - New picklist properties (usePicklistValues, objectApiName, fieldApiName)
  - New data source option for Salesforce picklist fields
  - New event handlers for object and field selection
  - New getter methods for picklist mode detection
  - New renderedCallback method for flow combobox initialization

- Add picklist integration to fsc_dualListBox3 component
  - New API properties for picklist configuration
  - New wire methods for object info and picklist values
  - New tracked properties for picklist data management
  - New updateOptionsFromPicklist method
  - New event handlers for picklist property changes

- Add HTML template updates for picklist configuration UI
  - New picklist configuration section with object and field selectors
  - Conditional rendering based on picklist mode

- Update utility files and metadata as needed

This enhancement allows users to select Salesforce objects and multipicklist fields
to dynamically populate dual list box options directly from Salesforce metadata.
@ericrsmith35
Copy link
Collaborator

Did I see online that there may still be issues with this change?

@AndyHaas
Copy link
Collaborator Author

AndyHaas commented Oct 3, 2025

@ericrsmith35 yea, please hold off. I will post a update once ready for review.

- Add 'picklist' constant to defaults object for new data source type
- Update inputTypeToOutputAttributeName mapping to use 'selectedOptionsPicklist' for picklist output
- Update inputTypeToInputAttributeName mapping to use 'allOptionsStringCollection' for picklist input
- Standardize code formatting with double quotes and consistent spacing
- This enables the dual list box component to support Salesforce picklist fields as a data source

Technical Details:
- Added picklist: 'picklist' to defaults object
- Modified output mapping: picklist -> 'selectedOptionsPicklist'
- Modified input mapping: picklist -> 'allOptionsStringCollection'
- Updated export statement formatting for consistency

API Impact: None - internal utility changes only
- Add three new input properties for picklist functionality:
  * usePicklistValues (Boolean) - Toggle to enable picklist data source
  * objectApiName (String) - Target Salesforce object for picklist field
  * fieldApiName (String) - Specific picklist field to use
- Add selectedOptionsPicklist (String[]) output property for picklist selections
- Improve XML formatting with consistent indentation and line breaks
- All properties marked as inputOnly except selectedOptionsPicklist which is output

Technical Details:
- Added usePicklistValues: Boolean input property
- Added objectApiName: String input property
- Added fieldApiName: String input property
- Added selectedOptionsPicklist: String[] output property
- Standardized XML formatting with 4-space indentation
- Properties follow Lightning Flow Screen component conventions

API Impact:
- New input properties: usePicklistValues, objectApiName, fieldApiName
- New output property: selectedOptionsPicklist
- No breaking changes to existing properties
- Add picklist data source option to selectDataSourceOptions array
- Implement picklist-specific input properties in inputValues:
  * usePicklistValues: Boolean toggle for picklist mode
  * objectApiName: String for target Salesforce object
  * fieldApiName: String for picklist field (marked as serialized)
  * selectedOptionsPicklist: String[] for picklist selections
- Add comprehensive picklist handling logic:
  * Automatic usePicklistValues toggle based on data source selection
  * Object and field change handlers with proper event dispatching
  * Serialization support for complex field API name objects
  * Clear unused attributes when switching data sources
- Improve code formatting and structure:
  * Standardize with double quotes and consistent spacing
  * Add comprehensive logging for debugging
  * Enhance error handling and validation

Technical Details:
- Added 'Picklist Values (from Salesforce field)' option to data source selection
- Implemented handleObjectChange() for object selection with dynamic type mapping
- Added serialization logic for fieldApiName to handle complex objects
- Enhanced clearUnusedAttributes() to manage picklist-specific properties
- Added isPicklist getter for conditional UI rendering

API Impact:
- New input properties: usePicklistValues, objectApiName, fieldApiName
- New output property: selectedOptionsPicklist
- Enhanced event handling for object/field selection
- No breaking changes to existing functionality
…t box component

- Add picklist-specific API properties:
  * objectApiName: Target Salesforce object for picklist field
  * fieldApiName: Specific picklist field to use
  * usePicklistValues: Boolean toggle for picklist mode
- Implement session storage for picklist selections:
  * STORAGE_KEY getter for unique storage identification
  * saveSelectedValues() and restoreSelectedValues() methods
  * Persistent selection state across component lifecycle
- Add picklist data handling:
  * selectedOptionsPicklist setter with array/CSV/string support
  * updateOptionsFromPicklist() for converting picklist values to options
  * fieldApiNameString getter for parsing complex field objects
- Enhance component lifecycle management:
  * connectedCallback() for initial value restoration
  * renderedCallback() for post-render value restoration
  * disconnectedCallback() for cleanup (with validation consideration)
- Improve value change handling:
  * Enhanced handleValueChanged() with comprehensive logging
  * _pushToFlow() method for Flow integration with proper formatting
  * Support for CSV and picklist output formats
- Add picklist-specific validation and error handling:
  * isPicklistMode getter for conditional logic
  * Enhanced validation with detailed logging
  * Error handling for field API name parsing

Technical Details:
- Added sessionStorage integration with unique keys per object/field combination
- Implemented wire methods for getObjectInfo and getPicklistValues
- Enhanced allOptionsStringFormat setter to handle picklist restoration
- Added comprehensive console logging for debugging picklist operations
- Improved code formatting with double quotes and consistent spacing

API Impact:
- New input properties: objectApiName, fieldApiName, usePicklistValues
- New output property: selectedOptionsPicklist
- Enhanced lifecycle methods: connectedCallback, renderedCallback, disconnectedCallback
- New internal methods: saveSelectedValues, restoreSelectedValues, _pushToFlow
- No breaking changes to existing functionality
- Add picklist formatting support in formatOptionsSet():
  * Handle picklist option type with {label, value} object mapping
  * Preserve existing picklist data structure from Salesforce
  * Add comprehensive logging for debugging picklist operations
- Enhance formatValuesSet() for picklist data:
  * Support picklist option type with array handling
  * Convert single values to arrays for consistency
  * Maintain backward compatibility with existing formats
- Update formatValuesGet() for picklist output:
  * Handle picklist option type with CSV formatting
  * Ensure consistent output format for Flow integration
- Improve allOptions setter with enhanced logging:
  * Add detailed console logging for option processing
  * Better error handling and debugging information
- Standardize code formatting:
  * Convert to double quotes and consistent spacing
  * Improve readability and maintainability

Technical Details:
- Added picklist case in formatOptionsSet() to map {label, value} objects
- Enhanced formatValuesSet() to handle picklist arrays and single values
- Updated formatValuesGet() to output picklist values as CSV strings
- Added comprehensive logging throughout option processing methods
- Improved error handling and debugging capabilities

API Impact:
- Enhanced formatOptionsSet() to support picklist option type
- Enhanced formatValuesSet() to handle picklist data structures
- Enhanced formatValuesGet() to output picklist values correctly
- No breaking changes to existing functionality
- Improved debugging and logging capabilities
- Add picklist-specific UI section with conditional rendering (isPicklist)
- Implement object selection using c-fsc_pick-object-and-field-3 component:
  * object-label bound to inputValues.objectApiName.label
  * object-type bound to inputValues.objectApiName.value
  * hide-field-picklist=true to focus on object selection
- Add field selection using c-fsc_field-selector-3 component:
  * Conditional rendering based on objectApiName.value
  * field-type-filter='multipicklist' to show only multipicklist fields
  * allow-multiselect=false for single field selection
  * required attribute for mandatory field selection
- Add selectedOptionsPicklist flow-combobox for picklist output:
  * Conditional rendering with isPicklist check
  * Proper value binding and event handling
- Improve HTML formatting with consistent 4-space indentation
- Maintain existing functionality for other data source types

Technical Details:
- Added template if:true={isPicklist} for conditional picklist UI
- Implemented object and field selection components with proper bindings
- Added selectedOptionsPicklist combobox for picklist value output
- Standardized HTML indentation throughout the template
- All picklist UI elements properly integrated with existing CPE structure

API Impact:
- New UI controls: objectApiName, fieldApiName, selectedOptionsPicklist
- Enhanced conditional rendering based on data source type
- No breaking changes to existing UI elements
- Add required={required} attribute to c-fsc_extended-base-dual-list-box component
- Pass required property from parent component to child component
- Enable proper validation and required field behavior in the dual list box
- Maintain existing component structure and functionality

Technical Details:
- Added required={required} binding to extended base dual list box
- Ensures required field validation is properly propagated to child component
- No changes to component logic, only attribute binding

API Impact:
- Enhanced required field validation support
- No breaking changes to existing functionality
- Add required={required} attribute to lightning-dual-listbox component
- Pass required property from parent component to Salesforce base component
- Enable proper validation and required field behavior at the base component level
- Maintain existing component structure and functionality

Technical Details:
- Added required={required} binding to lightning-dual-listbox
- Ensures required field validation is properly handled by Salesforce base component
- No changes to component logic, only attribute binding

API Impact:
- Enhanced required field validation support at base component level
- No breaking changes to existing functionality
- Update apiVersion from 47.0 to 64.0
- Align with current Salesforce API capabilities and features
- Ensure compatibility with latest Lightning Web Component features
- Maintain existing component functionality and metadata

Technical Details:
- Changed apiVersion from 47.0 to 64.0 in js-meta.xml
- No other metadata changes required
- API version bump enables access to newer LWC features if needed

API Impact:
- Updated to Salesforce API version 64.0
- Enables access to newer Lightning Web Component features
- No breaking changes to existing functionality
- Maintains backward compatibility
@alexed1
Copy link
Collaborator

alexed1 commented Oct 10, 2025

Nice stuff, Andy!

@ericrsmith35 ericrsmith35 self-assigned this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants