Recently Salesforce made embedding and launching a flow via LWC available. I have been unsuccessful at making this work even after looking through the documentation. https://developer.salesforce.com/docs/component-library/bundle/lightning-flow/documentation
It looks like you pass the flow name as well as the input variables which in this case would be a recordId. It specifically says that it takes an array in, so I added the recordId to the array and passed it in as a parameter.
html:
<template> <lightning-flow if:true={inputVariables} flow-api-name='virtual_diagnostic_notes' flow-input-variables={inputVariables} > </lightning-flow> </template> JS:
@api recordId; connectedCallback(){ //do something console.log('RECORD ID FOR LWC', this.recordId); console.log('inputVariables', this.inputVariables); } get inputVariables() { return [this.recordId]; } I keep getting this error:
