PDI · Question #139
PDI Question #139: Real Exam Question with Answer & Explanation
The correct answer is A: Add <isExposed> true</isExposed> to the statusComponent.js-meta ml file.. To make a Lightning Web Component available for use on record pages in Salesforce, the developer must set <isExposed>true</isExposed> and specify the appropriate target, such as <target>lightning__RecordPage</target>, in its meta-XML configuration file.
Question
A developer created a Lightning web component called statusComponent to be inserted into the Account record page. Which two things should the developer do to make the component available?
Options
- AAdd <isExposed> true</isExposed> to the statusComponent.js-meta ml file.
- BAdd <target> lighting _RecordPage </target> to the statusComponent.js-meta ml file.
- CAdd < masterLabel>Account</master Label> to the statusComponent.js-meta ml file.
- DAdd<target> Lightning_RecordPage </target> to the statusComponent.js file.
Explanation
To make a Lightning Web Component available for use on record pages in Salesforce, the developer must set <isExposed>true</isExposed> and specify the appropriate target, such as <target>lightning__RecordPage</target>, in its meta-XML configuration file.
Common mistakes.
- C. While
<masterLabel>is used to define the component's label in the App Builder, it does not directly control the component's availability on record pages. - D. The
<target>tag and other configuration metadata must be defined in the component'sjs-meta.xmlfile, not directly within thejscontroller file.
Concept tested. LWC configuration for record pages
Topics
Community Discussion
No community discussion yet for this question.