In Flow screen elements, picklist field throws cast exception when "previous" followed by "next" buttons are used
Last updated 10 days ago ·Reference W-7376568 ·Reported By 4 users
Flows are failing with below mentioned error message when "Previous" and "Next" buttons are used with Picklist fields.
"class moduleapi.interaction.FlowPicklistValue cannot be cast to class java.lang.String (moduleapi.interaction.FlowPicklistValue is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @51745f40; java.lang.String is in module java.base of loader 'bootstrap')"
1. Create a Lightning Component that will be surfaced on a Flow Screen Element
<aura:component implements="force:hasRecordId,lightning:availableForFlowScreens" access="global">
<aura:attribute name="country" type="String"/>
<design:attribute name="country" label="Country"/>
2. Create/Use an object that has a picklist field
3. Create a flow with the following variables:
- A text variable
- Variable of type 'record' - For the object created in step 2.
4. Add a screen element to the flow. Ensure navigation buttons are added.
5. Add a second screen element and in this element:
- Add the lightning component created above.
- For the lightning component, assign the text variable (from step 3) to the input parameter
- For the lightning component, assign the record variable for picklist field (from step 2 & 3) to the output parameter.
- Ensure navigation buttons are added.
6. Connect the elements, Save and Activate the flow.
7. Click on the Debug button in the flow
8. Enter a string in the Input Variable - Country
9. Click "Run"
10. Click "Next" button in the first screen.
11. On the second screen, click "Previous" This will take the user back to the first screen.
12. On the first screen, again, click "Next"
User should navigate to the next screen without any java exception message.
An error is thrown:
class moduleapi.interaction.FlowPicklistValue cannot be cast to class java.lang.String (moduleapi.interaction.FlowPicklistValue is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @51745f40; java.lang.String is in module java.base of loader 'bootstrap')
None as of now.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.