CSA Lightning Components 3 — Questions and Answers
Question 1: A Lightning component needs to display different content based on whether the user is on a mobile device or desktop. Which approach is recommended?
- Use CSS media queries only
- Use the formFactor global value provider (Correct answer)
- Create separate components for each device
- Check screen resolution in JavaScript
Correct answer: Use the formFactor global value provider
The formFactor global value provider ($Browser.formFactor) returns the device type, allowing components to adapt their display accordingly.
Question 2: Which Lightning feature allows administrators to give users the ability to personalize their Lightning Home page?
- User Permissions
- Dynamic Forms
- User Page Layouts (Correct answer)
- Component Visibility Rules
Correct answer: User Page Layouts
User Page Layouts allow end users to personalize their Lightning Home page by adding, removing, or repositioning components.
Question 3: What does the 'isExposed' property in the .js-meta.xml file control?
- Whether the component is publicly accessible via API
- Whether the component appears in the Lightning App Builder component panel (Correct answer)
- Whether the component's data is visible to all profiles
- Whether the component can be used in Communities
Correct answer: Whether the component appears in the Lightning App Builder component panel
Setting isExposed to true makes the component visible and available in the Lightning App Builder's component panel.
Question 4: Which type of Lightning page can be created using Lightning App Builder?
- Visualforce pages
- App pages, Home pages, and Record pages (Correct answer)
- Login pages and community pages only
- Report and dashboard pages
Correct answer: App pages, Home pages, and Record pages
Lightning App Builder supports creating App pages, Home pages, and Record pages for Lightning Experience.
Question 5: What is the purpose of component visibility filters in Lightning App Builder?
- To restrict which profiles can edit the component's code
- To conditionally show or hide components based on field values or user attributes (Correct answer)
- To filter the data displayed within a component
- To set row-level security on component data
Correct answer: To conditionally show or hide components based on field values or user attributes
Component visibility filters allow administrators to show or hide components based on conditions like record field values, user permissions, or device type.
Question 6: In a Lightning Record Page, which section allows you to add components that appear only in a specific record's context?
- Related Lists
- Activity Timeline
- Highlights Panel
- Record Details (Correct answer)
Correct answer: Record Details
The Record Details section of a Lightning Record Page is where field-level and record-specific components can be added and configured.
Question 7: Which statement is true about Dynamic Forms in Lightning Experience?
- They replace standard page layouts entirely for all users
- They allow fields and sections to be placed directly on the Lightning Record Page (Correct answer)
- They require Apex code to configure conditional visibility
- They are only available for custom objects
Correct answer: They allow fields and sections to be placed directly on the Lightning Record Page
Dynamic Forms allow administrators to place individual fields and field sections directly on Lightning Record Pages, enabling field-level visibility rules.
A Lightning component needs to display different content based on whether the user is on a mobile device or desktop.
Which approach is recommended?