Interview Questions

Part 3: Salesforce Lightning Interview Questions

Pinterest LinkedIn Tumblr
  1. How can we call multiple methods in desired order in Lightning Component?

We can achieve these requirements in two ways.

  1. Using Callback for each method
  2. Using Javascript Promises
  3. What type of Interface is required in Lightning component to enable as Tab?

In order to add Lightning Component as a Tab, My domain needs to be enabled in the org.We have to use force:appHostable interface to a Lightning Component to allow it to be used as Custom tab

  1. What type of interface is required in Lightning component to be used as Quickaction?

We can use force:lightningQuickAction interface to a Lightning Component to allow it to be used as a Custom action in Lightning Experience or mobile app. These components can be used object-specific or global actions in both Lightning Experience/Mobile app

  1. How are Lightning Components migrated between the environments?

Lightning components can be deployed using Changesets,Eclipse Ide,Metadata API and ANT Migration Tool.

  1. What is the purpose of aura:method in Salesforce Lightning?

The main purpose of  aura:method is to define a method as part of a component’s API. This enables you to directly to call a method in a component’s client-side controller instead of firing and handling a component event. Using aura:method simplifies the code needed for a parent component to call a method on a child component that it contains.

26.How to access Apex methods in Lightning Component?

We have to use @AuraEnabled  method in the Apex class to be accessible in Lightning Component

27. How to bind Apex class with Lightning Component?

We have to specify Apex class name in the Lightning Component. For example if we have created “opportunityController” Apex class and want to bind with Lightning Component then we will have to specify the below statement in the Lightning Component.

28. Can we enforce Field level Security in Lightning Component?

Field Level Security and CRUD permissions are not automatically enforced in Lightning component when Apex classes are referenced. But FLS and CRUD are automatically enforced through Lightning Data Service.

Write A Comment