Today we will see how we can create a reusable star rating lightning web component and can use by salesforce lightning flow.

  • Create a Lightning Web Component called lwcStarRating
lwcStarRating.html
lwcStarRating.js
lwcStarRating.css
lwcStarRating.xml
  • Create an Object to Save the Rating Values
Survey Form Object
  • Create a Flow to use the LWC
SurveyForm Flow
Flow Screen
Survey Form
lwcStarRating Variable Values
Create Record In Flow
Variables for saving values in Flow
  • Output
Screen Flow While Running
Created Record Id
Record is having the Rating Values

References: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_config_for_flow_screens

https://developer.salesforce.com/docs/component-library/bundle/lightning-flow-support/documentation

Categorized in: