I'm trying to embed a LWC into a screen flow, but when I save the following meta-xml file, I get the "lightning__RecordPage is not a flow related target" error:

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="wizardAtendimento">
        <targetConfig targets="lightning__RecordPage">
            <property name="iconName" type="String" label="Icon name"/>
            <property name="title" type="String" label="Title"/>
        <targetConfig targets="lightning__FlowScreen">
            <property name="iconName" type="String" label="Icon name" role="inputOnly"/>
            <property name="title" type="String" label="Title" role="inputOnly"/>
            <property name="selectedProduct" type="String" label="Produto selecionado" role="outputOnly"/>
            <property name="selectedType" type="String" label="Tipo de produto selecionado" role="outputOnly"/>
            <property name="selectedReason" type="String" label="Motivo de abertura selecionado" role="outputOnly"/>

Is there something wrong with this setup? What is the correct way of exposing the properties on the flow?


Adding the masterLabel and description attributes, and reducing the target list to a single target (the flow), and removing unnecessary attributes form the properties seem to have solved the issue for me. The only attributes that remained on the properties were name, type and role.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.