Categories

Top Salesforce Lightning Interview Questions

CTA

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

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?

components in Salesforce Lightning

Salesforce Lightning includes the following components:

  1. Lightning Component Framework – It is a javascript framework and a collection of general components that allow the development of recyclable components for personalizing the Salesforce1 Mobile App and Lightning Experience
  2. Lightning Experience – It is the new and modern user experience and interface for Salesforce
  3. Lightning Exchange – It relates to a part of AppExchange, which has over 70 partner components to start the development process
  4. 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
  5. Visual Building tools – It 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.

5. How are Lightning components built?

Lightning components are built using two programming models:

  • Native Aura Components Model

Aura is a freeware technology that powers the Lightning components. It is a UI framework used for the development of dynamic web apps for mobile and desktop devices. Aura bridges the client and server through partitioned multi-tier component development and uses JavaScript on the client-side as well as on the server-side. It has a scalable long-lived lifecycle to allow the development of growth-oriented apps.

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?

different types of events of Salesforce Lightning

Following are the three events of Salesforce Lightning components:

  1. System Events: Salesforce fires the system events during the Lightning app lifecycle.
  2. 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.
  3. 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?

component bundles of the Lightning.

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

CTA

Watch this Salesforce Lightning tutorial by Intellipaat.

Top Salesforce Lightning Interview Questions

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:

  1. The Lightning components for the javascript library of visual force must be first inserted into the intended visual force page through the tag.
  2. A Lightning app that is used for the component dependencies is then generated and pointed.
  3. Finally, a javascript function needs to be written that creates the component over the page through $Lightning.createComponent().

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:

Tool Description
Lightning Experience 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:

  1. Dragging and dropping them in the community builder and Lightning App Builder
  2. Adding it to the Lightning pages
  3. Starting it as a quick action
  4. 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 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?

  1. Capture Phase
  2. Default Phase
  3. 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:

  • Boolean
  • Integer
  • String
  • Datetime
  • Date
  • Decimal
  • Map
  • Set

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 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.

The value provider allows the usage of the component attribute’s value in the component Javascript and markup controller.

36. What are Lightning Web Components(LWC)?

Lightning Web Components can help build the Lightning components. They are the traditional HTML elements that are developed with advanced Javascript and HTML elements. The components can be built by using any model and locating the components on the Lightning page.

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.

39. What is the use of Javascript in the LWC?

  1. Javascript establishes HTML properties behavior.
  2. If a function, class, and variable defined in the module needs to be imported, the import statement has to be used
  3. Javascript files in the LWCs are the ES6 modules and everything declared in the module is local.
  4. 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?

Salesforce Lightning

  1. Lightning schema builder: It is a UI tool that is used to create and view fields, objects, and relationships
  2. 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
  3. Lightning Process Builder: It is a UI tool used for the visualization and creation of automated business processes
  4. 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
  5. Lightning App Builder: It is the latest UI tool that enables quick building of Lightning apps through components given by the Salesforce platform developers

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!

Course Schedule

Name Date
Salesforce Certification 2022-06-25 2022-06-26
(Sat-Sun) Weekend batch
View Details
Salesforce Certification 2022-07-02 2022-07-03
(Sat-Sun) Weekend batch
View Details
Salesforce Certification 2022-07-09 2022-07-10
(Sat-Sun) Weekend batch
View Details

Leave a Reply

Your email address will not be published. Required fields are marked *