16.1 how to make our First SF LWC available in app builder ?
- Get link
- X
- Other Apps
how to make our SF LWC available in app builder ?
1. Update the Component’s Metadata File
Every LWC has a metadata configuration file with the suffix .js-meta.xml. Open this file and ensure it contains the required configurations.
Here’s an example of a basic configuration for App Builder:
xml<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="YourComponentName">
<apiVersion>58.0</apiVersion> <!-- Use the API version of your Salesforce org -->
<isExposed>true</isExposed>
<targets>
<target>lightning__AppPage</target>
<target>lightning__RecordPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
<isExposed>: This must be set totrueto make the component available in the App Builder.<targets>: Defines where the component can be used:lightning__AppPage: For App Pageslightning__RecordPage: For Record Pageslightning__HomePage: For Home Pages
If you want your component to be available in all types of pages, include all three targets as shown above.
- Get link
- X
- Other Apps
Comments
Post a Comment