Skim through these top Salesforce Lightning interview questions and answers to prepare yourself for the interview.
Q1. What is Salesforce Lightning?
Q2. What is Lightning Framework?
Q3. What are the components in Salesforce Lightning?
Q4. What is Lightning Experience?
Q5. How are Lightning components built?
Q6. What is the use of aura: namespace?
Q7. What are the different types of events of Salesforce Lightning components?
Q8. What is Lightning Data Service?
Q9. What are the component bundles of the Lightning components?
Q10. How can we use Lightning components with Salesforce1 Mobile App?
The Salesforce Lightning Interview Questions and Answers are divided into:
1. Basic Salesforce Lightning Interview Questions
2. Intermediate Salesforce Lightning Interview Questions
3. Advanced Salesforce Lightning Interview Questions
Basic Salesforce Lightning Interview Questions
1. What is Salesforce Lightning?
Salesforce Lightning is an app development framework developed by salesforce.com that simplifies business processes for users.
2. What is Lightning Framework?
The Lightning Component Framework is a UI Framework by Salesforce that is used to develop single-page applications for desktop and mobile devices. Lightning Components can be built using two programming models – the Aura Components Model, and the Lightning Web Components Model.
3. What are the components in Salesforce Lightning?
Salesforce Lightning includes the following components:
- Lightning Experience – It is the new and modern user experience and interface for Salesforce
- Lightning Exchange – It relates to a part of AppExchange, which has over 70 partner components to start the development process
- Lightning Design System – It helps build applications with the look and feel of Lightning Experience but without having to write a single line of CSS
- Visual Building tools – These relates to drag-and-drop features that enable easy and quick customization and app building
4. What is Lightning Experience?
Lightning experience is the name for the latest Salesforce desktop application. It has the latest features with advanced UI and speed optimization.
Get 100% Hike!
Master Most in Demand Skills Now !
5. How are Lightning components built?
Lightning components are built using two programming models:
- Native Aura Components Model
Aura allows the creation of apps that are not dependent on Salesforce data. Because of this, there is minimal disruption to the daily users. As the programs don’t have to be optimized for each device, Aura allows for more efficiency in development.
- Lightning Web Components Model
The aspects of Web Components that work well in browsers are supported by Lightning Web Components. It only adds what is necessary to work in all Salesforce-supported browsers. It is a W3C Web Components standard implementation.
Lightning Web Components Framework is a set of advanced lightweight frameworks that are based on the most recent web standards. It’s a reusable code-based document object model element. It can help create sophisticated interfaces without using JS or the creation of a library making it simple and fast to use thus, saving a lot of time and work on the web stack.
6. What is the use of aura: namespace?
Aura: namespace comprises all the main building blocks to define applications and components.
7. What are the different types of events of Salesforce Lightning components?
Following are the three events of Salesforce Lightning components:
- System Events: Salesforce fires the system events during the Lightning app lifecycle.
- Application Event: It follows a traditional publish-subscribe model and is fired from an instance of a component. All the components that provide a handler for the event are notified.
- Component Event: It is fired from an instance of a component and handled by the component that fired the event or a component in the containment hierarchy that receives the event.
8. What is Lightning Data Service?
Lightning data service is used for carrying out basic tasks like creating, editing, loading, or deleting a record in a component without Apex code. It handles sharing rules and field-level security. Lightning data service enhances the performance consistency and UI.
9. What are the component bundles of the Lightning components?
Following are the component bundles of the Lightning components:
- Controller: It handles the client-side events
- Documentation: This component bundle is used for recording the component’s use
- Style: It includes component style
- Renderer: It contains a component default rendering behavior
- Helper: General logic can be written in this component bundle used by different controller methods to avoid repetition
Watch this Salesforce Lightning tutorial by Intellipaat.
10. How can we use Lightning components with Salesforce1 Mobile App?
Lightning Components can be used with the Salesforce1 mobile app by creating a traditional Lightning tab that refers to the component. That tab can be added to the Salesforce1 mobile navigation.
11. What are the different types of Lightning Record pages, and how are they built?
Record page, App page, and Homepage are the different types of Lightning record pages and they can be built using Lightning App Builder.
12. What is Lightning Out?
Lightning out is used if a component has to be used on the external site. The advantage is that Lightning components can be utilized in a visual force page. It acts as a bridge to surface Lightning components in any remote web container.
13. How can we utilize a Lightning component in the VisualForce Page?
Using Lightning Out can help embed the Lightning component on the VisualForce page. It can be achieved in three steps:
- A Lightning app that is used for the component dependencies is then generated and pointed.
14. What are attributes, and what are the required parameters in the attribute definition?
Attributes are variables that are used for storing values. The Default, Type, Name, Access, and Description must be defined in the attribute definition. Name and Type are the only required parameters in the attribute definition.
15. What is the difference between a component event and an application event?
Component event is used for interaction between the parent and child. The change in the child component can be communicated to the parent component through the component event.
Application events are used to send modifications in the component to a wide audience. The components that have registered for this event will get an alert.
16. Where can we display lightning components?
You can display lightning components at the following:
||You can display lightning components by using the App Builder in Lightning Experience.
|Salesforce1 Mobile App
||You can display the lightning in the Salesforce1 Mobile App. You’ll need to create a custom Lightning tab to reference the component. Then you can add the tab in the Mobile Navigation.
|Standalone Lightning App
||You can create a standalone Lightning app and include the lightning component in it.
|Add Apps to the Lightning Experience App Launcher
||Lightning Components apps are available in the App Launcher.
|Add Apps to Lightning Experience and Salesforce App Navigation
||Lightning Components tabs can be added to the apps. These will then be displayed in the app’s navigation bar as items.
|Lightning App Builder and Community Builder
||You can display the Lightning Components in template-based communities by using the Community Builder.
Check out our Salesforce Interview Questions guide.
Intermediate Salesforce Lightning Interview Questions
17. Explain Namespace in the Salesforce Lightning components?
The Namespace is used to group components together and can be created through an organization. The Lightning components are a part of a namespace. C is the default namespace.
If the namespace is created for an organization, then that namespace can be used for the Lightning components.
18. Where can the Lightning components be used?
Lightning components can be used in the following places:
- Dragging and dropping them in the community builder and Lightning App Builder
- Adding it to the Lightning pages
- Starting it as a quick action
- Creating stand-alone applications
19. Differentiate between component events and application events in the context of Salesforce Lightning.
Component events act as a means of communication between a parent and a child. A change in the child component can be communicated to the parent component using Component Events.
Application Events communicate changes in the component to a much bigger audience. All the components that have registered for the event get notified about the change.
20. Differentiate between Salesforce Classic and Salesforce Lightning.
- Salesforce Lightning provides an enhanced user interface.
- You need to hire a Salesforce Developer to operate Salesforce Classic, while Salesforce Lightning is much easier to work with.
- With Lightning, you don’t need Visualforce for every task.
- Salesforce Lightning has more advanced security features than Salesforce Classic.
- Lightning provides Einstein (Wave) Analytics Reporting to its users. A feature that is missing from Classic.
21. What are Component events?
Components events are the events that child components dismiss, and parent components handle. Component events are used when a value from the child component needs to be sent to the parent component.
22 What are Application events?
The application events can be dismissed and handled by any component. It does not require any type of relationship among the components. These components should be a part of one application.
23. What are the different phases in the application events propagation?
- Capture Phase
- Default Phase
- Bubble Phase
24. What is Lightning App Builder?
The Lightning App Builder is a click-and-point tool used for creating Lightning pages for mobile applications and the Salesforce Lightning Experience. The Lightning pages are built through the Lightning components that are configurable, reusable, and compact. The Lightning App Builder can help build a home page, app page, and record page.
25. What are bound and unbound expressions?
Unbound and bound expressions are used to perform data binding. When a child component is called from the parent component, the value can be sent from the attribute of a parent component to a child component attribute.
26. What are the different types of attributes that can be used for storing the values?
The following attributes are used for storing values:
27. What is the importance of the aura: method tag in the Salesforce Lightning?
The aura: method is used for defining the method within the API of the component. This allows a method to be directly called in the client-side controller of a component instead of handling or dismissing an event.
The <aura: method> can help simplify the code that the parent component requires to call a method on the child component.
28. Explain force: record data.
The force: record data is a conventional controller of the Lightning component. Operations like deleting, creating, and editing a record can be accomplished through force: record data. It removes and recognizes the replicate request passing to the server if the same record data is requested.
Go through our Salesforce Lightning Tutorial and prepare for your next interview.
29. Explain Lightning: navigation.
Lightning: navigation is used to navigate to a page reference or create a URL from the given page reference. For navigating, the page reference object must be defined. Navigation is possible for the following supported features:
- Lightning Component
- Record Page
- Object Page
- Named Page
- Web Page
- Knowledge Article
- Record Relationship Page
- Navigation Item Page
30. What is FlexiPage?
The metadata related to a Lightning page is portrayed by FlexiPage. The Lightning page portrays an adaptive screen that is made up of regions that include the Lightning components. The Lightning page includes 25 components.
The Flexi page is stored as an XML file, and deployed through a deployment tool or Salesforce metadata API. The Lightning pages are referred to as Flexipages in the API.
31. What is Lightning Locker in Salesforce Lightning?
The Lightning Locker service is a robust and powerful security architecture for the Lightning components. It enhances security by isolating Lightning components that belong to one namespace from those in a different namespace. It promotes best practices thus, enhancing the supportability of the code by only allowing access to supported APIs and removing access from non-published framework internals.
32. What is the importance of the implements in the Lightning component?
Implements are used for referring to the platform interfaces that allow usage of the components in various contexts or grant access to additional context data. A component can use multiple interfaces with the help of implements.
33. What is the difference between and ?
<ui:input> does not contain Lightning Design System styling, while <Lightning:input> contains
34. What is the use of Lightning:recordEditForm?
In the Lightning:recordEditForm, the Lightning:inputField is used to create the editable fields. Using the Lightning: output field, the read-only information can be displayed.
Lightning:recordEditForm has the following features:
- It displays the record edit layout to edit a particular record
- It displays the record to create the layout to create a particular record
Get your Salesforce Certification from Intellipaat. Enroll now!
Advanced Salesforce Lightning Interview Questions
35. What is an action provider and a value provider?
Action provider allows the management of the actions, events, and handlers for the component.
36. What are Lightning Web Components(LWC)?
Salesforce Extensions for the Visual Studio code is required to develop the LWC, and salesforce CLI is used for deploying it from the desired organization.
37. What is Scratch org?
Scratch org is an expandable Salesforce org that is used for the purpose of testing and development. It is a source-driven and disposable deployment of Salesforce code and metadata.
A scratch org is completely configurable, enabling developers to imitate different Salesforce editions that include different features and preferences. The scratch org configuration file can be shared with other team members to carry out development.
Additionally, packages can be installed and synthetic or dummy data can be deployed for testing. While its default duration is for seven days, the Scratch org can be created for 30 days after which it is deactivated.
Also, Check out our blog on Record Types in Salesforce!
38. What is the use of the meta configuration file in the LWC?
The meta configuration file specifies the metadata values to the components. It will result in an error when changes are pushed if there is no configuration file for the component.
- If a function, class, and variable defined in the module needs to be imported, the import statement has to be used
- lwc is the core module in Lightning Web Components. The import statement imports LightningElement from the lwc module.
40. What is the purpose of the force:appHostable interface in the Salesforce Lightning component?
In the Salesforce mobile app or the Lightning component, the force:appHostable interface can be used as a custom tab.
Get ready for a Salesforce job by going through these Top Salesforce Admin Interview Questions and Answers!
41. What is the purpose of the Lightning: action override in the Salesforce Lightning Component?
The Lightning: action override allows a component to be implemented as an override for a standard action. It is possible to override the New, Tab, Edit, and View standard actions on most standard and custom components. It has no effect except when used within Lightning Experience, the Salesforce mobile app, and Experience Builder sites.
42. What are the tools present in Salesforce Lightning?
- Lightning schema builder: It is a UI tool that is used to create and view fields, objects, and relationships
- Lightning Connect: This integration tool makes it simpler for the Force.com app to consume the data from the external source, which compiles to OData spec
- Lightning Process Builder: It is a UI tool used for the visualization and creation of automated business processes
- Lightning Component Framework: It comprises extensions and components that allow the building of recyclable components, personalization of the Salesforce1 mobile app, and development of independent apps
- Lightning App Builder: It is the latest UI tool that enables quick building of Lightning apps through components given by the Salesforce platform developers
Check out our blog to learn about map class in salesforce!
43. How do the capture phase and bubble phase propagate?
The capture phase propagates from top to bottom while the bubble phase propagates from bottom to top.
44. How can we define the field-level security in the Salesforce Lightning components?
To define the field level security, Lightning:recordEditForm, force: record data, and Lightning: record form should be used.
Hope these Salesforce interview questions on lightning will help you prepare well for your next interview. Good luck!
Join our Salesforce Community for the latest discussions on Salesforce. Ask the experts!