Salesforce Fact #555 | validate() lwc inputs in screen flow

Do you know we can use a validate() method to put some validation on lwc input components in screen flow.

Suppose, we have a combobox in lwc which we are using in the screen flow and it is marked as required. But if we click the next button in screen flow, it goes to the next screen even if no value is selected. To add validation, we can use the validate() method. The UI can be improved in terms of showing the message.

Reference: https://developer.salesforce.com/docs/component-library/documentation/lwc/use_flow_validate_user_input_for_custom_components.html

Attached are the screenshots.










Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow