You need to sign in to do that
Don't have an account?
Shravan Kumar 71
Expose LWC in Mobile App
I am trying to add a custom LWC to a phone record page however getting the below error message. Could anyone help me out how to make the component mobile viewable.
Greetings to you!
You can configure a component to display on a Lightning app page when the page is rendered in desktop format (Large), phone format (Small), or both.
In the <targetConfigs> section of the component’s configuration file, use the <supportedFormFactors> tag set to declare which form factors the component supports for a page type.
App pages support the Large and Small form factors. Record and Home pages support only the Large form factor.
Small—Represents the phone form factor. Supported for lightning__AppPage only.
Also, make sure to add your LWC to lightning__AppPage.
Please refer to the below links which might help you further.
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_config_form_factors
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_configuration_tags
https://developer.salesforce.com/docs/component-library/documentation/lwc/use
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
You can configure a component to display on a Lightning app page when the page is rendered in desktop format (Large), phone format (Small), or both.
In the <targetConfigs> section of the component’s configuration file, use the <supportedFormFactors> tag set to declare which form factors the component supports for a page type.
App pages support the Large and Small form factors. Record and Home pages support only the Large form factor.
Small—Represents the phone form factor. Supported for lightning__AppPage only.
Also, make sure to add your LWC to lightning__AppPage.
Please refer to the below links which might help you further.
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.use_config_form_factors
https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_configuration_tags
https://developer.salesforce.com/docs/component-library/documentation/lwc/use
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Hi Khan, your post is really helpful.
I just want to update the now "Small" is also supported by "lightning__RecordPage"
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<supportedFormFactors>
<supportedFormFactor type="Small" />
<supportedFormFactor type="Large" />
</supportedFormFactors>
</targetConfig>
</targetConfigs>