PDI · Question #198
A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface. Which approach can be used to accomplish this?
The correct answer is C. Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce. To make a Lightning Web Component accessible within the Salesforce Classic user interface, developers should use Lightning Out, which enables embedding Lightning components onto Visualforce pages.
Question
A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface. Which approach can be used to accomplish this?
Options
- AWrap the Lightning Web Component In an Aura Component and surface the Aura Component as
- BEmbed the Lightning Web Component is a Visualforce Component and add directly to the page
- CUse the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce
- DUse a Visualforce page with a custom controller to invoke the Lightning Web Component using a
How the community answered
(51 responses)- A2% (1)
- B12% (6)
- C78% (40)
- D8% (4)
Why each option
To make a Lightning Web Component accessible within the Salesforce Classic user interface, developers should use Lightning Out, which enables embedding Lightning components onto Visualforce pages.
Wrapping an LWC in an Aura Component is a pattern for exposing LWC to other Aura components, typically within Lightning Experience, and does not inherently make the component available in Salesforce Classic without the use of Lightning Out applied to the Aura component.
Lightning Web Components cannot be directly embedded into Visualforce Components because they are based on different underlying frameworks and rendering engines, requiring a bridging mechanism like Lightning Out.
Lightning Out is a feature designed to embed Lightning Components (both Aura and LWC) into external web applications, including Salesforce Classic Visualforce pages, by providing the necessary JavaScript library to bootstrap the Lightning runtime. This allows modern components to be rendered in older UI contexts.
While a Visualforce page is involved, simply using a custom controller to 'invoke' an LWC is not the defined mechanism; Lightning Out provides the specific framework and JavaScript library for embedding LWCs.
Concept tested: Lightning Out for LWC in Classic/Visualforce
Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.use_visualforce_lightning_out
Topics
Community Discussion
No community discussion yet for this question.