Development questions
How do you make an LWC available in Lightning App Builder, Record pages or Experience Builder, and expose configurable properties?
DevelopmentMedium
Configure the component's js-meta.xml:
xml
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>60.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__RecordPage</target>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<property name="title" type="String" default="Hello"/>
<objects><object>Account</object></objects>
</targetConfig>
</targetConfigs>
</LightningComponentBundle>
Set isExposed to true, list targets, and declare each admin-configurable property in targetConfigs; the JS must expose it with @api title;. Use lightningCommunity__Page for Experience Builder.
lwcapp-buildermeta-xml
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?