0

I have a lwc that I want to be displayed on app mobile but it's giving me always the following error:

enter image description here

This is my lwc .XML configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__RecordAction</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordAction">
            <actionType>ScreenAction</actionType>
        </targetConfig>
        <targetConfig targets="lightning__RecordPage">
            <property name="recordpage_display" type="Boolean" default="true"></property>
            <supportedFormFactors>
                <supportedFormFactor type="Large"/>
            </supportedFormFactors>
        </targetConfig>
        <targetConfig targets="lightning__AppPage">
            <property name="recordpage_display" type="Boolean" default="true"></property>
            <supportedFormFactors>
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>
        <targetConfig targets="lightning__HomePage">
            <supportedFormFactors>
                <supportedFormFactor type="Large" />
            </supportedFormFactors>
        </targetConfig>
   </targetConfigs>
    </LightningComponentBundle>

Is there something I'm setting wrong or missing in order to make it work properly?

Regards,

1 Answer 1

4

In order to support mobile on record page you just have to add <supportedFormFactor type="Small" /> to the related supportedFormFactors section:

<targetConfig targets="lightning__RecordPage">
    <property name="recordpage_display" type="Boolean" default="true"></property>
    <supportedFormFactors>
        <supportedFormFactor type="Large"/>
        <supportedFormFactor type="Small" />
    </supportedFormFactors>
</targetConfig>

Please note that Home pages support only the Large form factor, docs.

1
  • Thanks a lot! It works now!
    – molinet
    Commented Apr 26, 2022 at 12:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .