CSA Lightning Components 5 — Questions and Answers
Question 1: Which tool would an administrator use to troubleshoot a Lightning component that is not rendering correctly on a page?
- Developer Console > Logs
- Lightning Component Debug Mode in Setup (Correct answer)
- Salesforce Inspector browser extension
- Process Builder debug logs
Correct answer: Lightning Component Debug Mode in Setup
Lightning Component Debug Mode, enabled in Setup, disables minification of JavaScript so errors are easier to read in the browser console.
Question 2: What is the primary difference between an Aura component and a Lightning Web Component (LWC)?
- Aura is server-side only; LWC is client-side only
- LWC is based on modern web standards; Aura uses a proprietary framework (Correct answer)
- LWC requires Apex; Aura does not
- Aura components cannot be used in Lightning App Builder
Correct answer: LWC is based on modern web standards; Aura uses a proprietary framework
LWC is built on modern web standards (HTML, JavaScript, CSS) while Aura uses Salesforce's proprietary component model.
Question 3: When assigning a Lightning Record Page to a specific record type, which step is required after saving the page in App Builder?
- Republish the page from Setup
- Activate the page and assign it to the record type and profiles (Correct answer)
- Flush the org cache
- Deploy the page using the Metadata API
Correct answer: Activate the page and assign it to the record type and profiles
After saving, you must activate the Lightning Record Page and configure its assignment by record type and/or profile for it to take effect.
Question 4: Which approach allows a Lightning component to refresh its data after a related record is updated elsewhere on the page?
- Polling with setInterval
- Using the refreshApex function or wire adapter refresh (Correct answer)
- Reloading the entire browser page
- Adding a refresh button that calls Apex directly
Correct answer: Using the refreshApex function or wire adapter refresh
refreshApex is the recommended approach to re-invoke a wired Apex method and update component data when underlying records change.
Question 5: What is the function of the 'lightning__RecordAction' target in an LWC metadata file?
- Makes the component available as a custom quick action on record pages (Correct answer)
- Allows the component to read record data automatically
- Exposes the component in the global actions menu
- Enables the component to override standard save actions
Correct answer: Makes the component available as a custom quick action on record pages
The lightning__RecordAction target makes an LWC available as a custom action that can be added to record page action bars or quick action menus.
Question 6: An administrator notices a Lightning component works in a sandbox but shows an error in production. What is the most likely cause?
- The component was not deployed using a Change Set or other deployment tool (Correct answer)
- Lightning Debug Mode is not enabled in production
- Production orgs do not support Lightning components
- The component uses a Visualforce page internally
Correct answer: The component was not deployed using a Change Set or other deployment tool
Lightning components must be explicitly deployed to production via Change Sets, Salesforce DX, or another deployment method — they do not automatically sync.
Question 7: Which Lightning App Builder layout option best supports a component that needs to span the full width of a record page?
- Two-column layout with equal widths
- Header and Right Sidebar layout
- Three-column layout
- Full-width region or one-column layout (Correct answer)
Correct answer: Full-width region or one-column layout
A full-width region or one-column layout in the Lightning App Builder provides the maximum horizontal space for a single component.
Which tool would an administrator use to troubleshoot a Lightning component that is not rendering correctly on a page?