salesforce Interview Questions

Last updated on Nov 16, 2023

Salesforce is a Customer Relationship Management (CRM) service provider which helps the enterprises to connect better with their customers by using the CRM software with cloud-based solutions. It supports the business to manage their customer's data and track their activities efficiently.

In this article, you can go through the set of Salesforce interview questions most frequently asked in the interview panel. This will help you crack the interview as the topmost industry experts curate these at HKR training.

Most Frequently Asked Salesforce Interview Question

Let us have a quick review of the Salesforce interview questions.

1. What is the benefit of Salesforce CRM?

Ans:

  • It ensures faster and better sales opportunity.
  • It deploys an analytical approach to customer acquisition.
  • It reduces cost and improves customer satisfaction.
  • Provides automation support for repetitive and less important tasks.
  • Improved efficiency and enhanced communication on all fronts.

2. What are Workflows in Salesforce? What are the Actions in a Workflow?

Ans: A workflow in Salesforce is a container or a business logic engine which automates certain actions based on particular criteria. If the criteria will match then it executes the actions else record will get saved but actions are not executed. There are two types of actions in the workflow.

  1. Immediate Actions: These are the actions which get executed when the record is created or edited.
  2. Time-dependent Actions: These are the actions which get executed after a certain duration of time. After this period, the workflow rules in Salesforce will re-evaluate the record to check whether the rule criteria has matched. If the record matches the criteria, the aligned actions are then executed.

 

3. What are the different types of templates that can be created in Salesforce?

Ans: 

1.HTML with letterhead

Only the administrators and users having “Edit HTML Templates” permissions can able to create this template based on a letterhead.

2.Custom HTML

The administrators and users having “Edit HTML Templates” permissions can create this template without the need of a letterhead.

3.Visualforce

Only administrators and developers can able to create this template. Advanced functionalities like merging data from multiple records are available only in this template.

 

                  Wish to make a career in the world of salesforce? Start with HKR'S  salesforce online training ! 

4. How many records can a select query return? How many records can a SOSL query return?

Ans: 

  • The maximum number of records that SOQL command retrieves is 50,000.
  • The maximum number of records that SOSL command retrieves is 2,000.

5. What are the actions in the workflow?

Ans: The actions in the workflow are.

  • Field update 
  • Task
  • Outbound message 
  • Email alert

6. Which fields are automatically Indexed in Salesforce?

Ans: The following fields are automatically indexed in salesforce.

  • Primary keys - Id, Name and Owner fields.
  • Foreign keys - lookup or master-detail relationship fields.
  • Audit dates such as SystemModStamp.
  • Custom fields marked as an External ID or a unique field.

7. Explain the difference between Workflow and the Process Builder?

Ans: Both are the declarative automation tools used in extending the functionality of Salesforce platforms. Workflow and Process Builder has point and click functionality and various features to automate business process.

Workflow:

It is an automation tool which evaluates an argument. The functions in automation include field update, sending an email message, creating a task, or sending an outbound message. A workflow can evaluate only a single criteria before the automation is triggered or doesn’t.

Process Builder:

It is a new automation tool which has various functions. It includes creating a record, updating child records, posting to chatter, launching a flow and many more. The process builder evaluates multiple criteria and triggers different automation depending on the one met.

8. What are the different ways of deployment in Salesforce?

Ans: Salesforce is deployed using.

  1. Change Sets.
  2. Eclipse with Force.com IDE.
  3. Force.com Migration Tool – ANT/Java-based.
  4. Salesforce Package.

9. What are the Triggers in Salesforce? How are they different from Workflows?

Ans: The triggers in Salesforce are called as Apex Triggers. It is distinct and available for common actions like lead conversions. This code is executed before or after a record is inserted or updated.

A trigger is different from a workflow as the former uses a piece of code; whereas, a workflow is an automated process and will not use any code.

10. Differentiate between Salesforce Object Query Language and Salesforce Object Search Language.

Ans: 

Salesforce Object Query Language (SOQL):

It will let to search only for one object. All types of fields can be queried in SOQL. Data Manipulation Language (DML) operations can be performed on the query results.

Salesforce Object Search Language (SOSL):

It will let to search for multiple objects. SOSL can query only for texts, emails, and phone numbers. DML operations cannot be performed on the search results.

11. What are the permission sets?

Ans: A collection of settings or permissions is called a permission set. It extends the user functional access without changing the actual profiles. Permission sets are used for various types of users to extend access functionality regardless of their roles. It consumes time for creating a profile; instead of this, it is easy to create a permission set.

12. What is the difference between a Role and Profile in Salesforce?

Ans: 

Profile:

A profile controls the access to the records in a Salesforce org. Without assigning a profile, no user can work on the Salesforce org, so it is mandatory for every user.

Role:

Unlike a profile, a role is not mandatory for every user. The main function of the role hierarchy that it allows higher-level users in the hierarchy to get access to records owned by lower-level users in the hierarchy. Sales Manager is the best example who gets access to records owned by Sales Reps while their peers do not get access to it.

13. What are the different ways to store various types of records in Salesforce?

Ans: There are five different ways in Salesforce to store various types of records such as images, files, and documents. They are

  1. Attachments 
  2. Google drive 
  3. Chatter Files 
  4. Libraries 
  5. Attachments.

14. What is an Audit trial?

Ans: The Audit trail tracks the changes that are made in the organization by you and the administrators. The audit trail shows the information of twenty most recent changes which are made in your organization. These things are tracked.

  • The date and time. 
  • Username of who made the changes.  
  • What the change was. 

15. What are the types of email templates that can be created in Salesforce?

Ans: The templates available in Salesforce are.

  1. Text Template:  A user can change or modify this template.
  2. HTML with letterhead: The administrators and users having Edit HTML permission can only create this email template based on letterhead.
  3. Custom HTML: It requires knowledge of HTML for customising the HTML with the HTML code for inserting it into the email template.
  4. Visualforce Email Template: Only administrators and developers can able to create these templates using VisualForce. It is capable of merging the data from various records.

16. What are the three types of bindings used in Visual force? What does each refer to?

Ans: There are three types of bindings used in Salesforce.

  • Data bindings: These bindings refer to the dataset in the controller. 
  • Action bindings: These binding refers to the action method in the controller.
  • Component bindings: These binding refers to other Visual force components.

The Data bindings and Action bindings are most commonly used in every Visualforce page.

17. What is Sandbox in Salesforce? What are the types of Sandboxes available?

Ans: Sandbox is a similar to Salesforce production which is used in testing, development and training. The sandbox content and size varies depending on the type of sandbox and the edition of the production organization that is associated with the sandbox. There are four types of sandboxes available.

  1. Developer Sandbox
  2. Developer Pro Sandbox
  3. Partial Data Sandbox
  4. Full Sandbox

18. What are the main differences between the data table vs page block table tags?

Ans:

Page block:

  • It should be defined inside a page block station or page block.
  • It uses the style sheets for designing the visual pages.
  • It requires the attribute “value”.
  • The Column Headers are displayed automatically.

Data table:

  • There is need for mentioning it inside the page block station or page block.
  • It uses the custom style sheets for displaying the data.
  • It doesn’t require any values.
  • The column headers must be specified explicitly.

19. What can cause data loss in Salesforce?

Ans: There are many things which cause data loss in Salesforce.

  1. While changing the date and time.
  2. While migrating to number, percent and money from other data types.
  3. While migrating to multi-select picklist from other types except for picklist.
  4. While moving from the checkbox, auto number, multi-select picklist to any other types.
  5. While changing the text area to phone, URL, email or text.

20. How does Salesforce track sales details?

Ans: The Salesforce track the sales details which produce accurate results based on the following factors.

  • The number of sales on a regular basis.
  • The number of customers served on a daily basis.
  • Complete reports produced by the Sales Manager.
  • Generating sales reports on a timely basis.
  • Providing the details of repeat customer activity.

21. What are the types of custom settings in Salesforce? What is the advantage of using custom settings?

Ans: There are two types of custom settings in Salesforce:

  1. Salesforce List Custom Settings.
  2. Hierarchy Custom Settings. 
  • List Custom Settings are a type of custom settings which provides a reusable set of static data that can be accessed across the organization irrespective of a user/ profile.
  • Hierarchy Custom Settings are a type of custom settings that uses built-in hierarchical logic for “personalizing” settings for specific profiles or users.
  • The advantage of using custom settings is that it allows developers in creating a custom set of access rules for various users and profiles.

22. What are the different type of collections you have in Apex?

Ans:

There are three main types of collections available in Apex.

1. Lists:

A list is an ordered collection of elements distinguished by indices. The data type of list elements can be of any type such as primitive types, user-defined types, sObjects, collections and built-in Apex types.

2. Sets:

A set is an unordered collection of elements without containing any duplicates in it. The data types of set elements can be of any type such as primitive types, user-defined types, sObjects, collections and built-in Apex types.

3. Maps:

A map is a collection of key-value pairs where each unique key maps to a single value. The keys and values can be any data type such as primitive types, user-defined types, sObjects, collections and built-in Apex types.

23. Can you give an example of a Salesforce API and its usage?

Ans: Salesforce has various API which interacts with the system in different ways.

REST: It integrates with Force.com applications by using simple HTTP methods. The methods are in either XML or JSON formats which makes API for developing mobile applications or external clients.

Bulk: It provides programmatic access which loads data quickly into the Salesforce organization.

Streaming: It is used in receiving the notifications to the changes in Salesforce data which match a defined SOQL query. This API is useful when there is a need for notifications that must be pushed from the server to the client based on criteria that are defined.

24. What are the different methods of batch Apex class?

Ans: The “Database.Batchable” interface contains three methods for implementation:

  1. Start method:
    global (Database.QueryLocator | Iterable) start(Database.BatchableContext bc) {}
  2. Execute method:
    global void execute(Database.BatchableContext BC, list

    ){}

  3. Finish method:
    global void finish(Database.BatchableContext BC){}

25. What are the different types of reports available in Salesforce? Can we mass delete reports in Salesforce?

Ans: There are four types of reports available in Salesforce.

1.Tabular reports

The reports contain simple excel tables which provide a list of items with the grand total

2.Summary reports

The summary reports are similar to tabular reports but have the functionality of grouping rows, viewing subtotals & creating charts.

3.Matrix reports

These are the two-dimensional reports which allow group records both by row and column

4.Joined reports

The multiple blocks represent the data from different reports based on the same or different report types.

The mass deletion of reports is possible and it can be done with an option available under “Data Management” in Setup.

26. What is a Connected App?

Ans: With the use of APIs, the connected app integrates an application with Salesforce. It uses the standard SAML and OAuth protocols for authentication, providing single sign-on, tokens for usage with Salesforce APIs. In addition to OAuth capabilities, connected apps allow Salesforce admins to set various security policies and have explicit control over who can use the corresponding apps.

27. How can you call an Apex Class in Salesforce?

Ans: There are many ways of calling an Apex class in Salesforce.

  • From the Visualforce page.
  • From Developer Console.
  • From JavaScript links.
  • By using a trigger.
  • From another class.
  • From home page components.

28. Why use Batch Apex instead of Normal Apex?

Ans: There are many reasons why Batch Apex is better than Normal Apex.

  • A Batch Apex uses 200 records per cycle for executing SOQL queries whereas a Normal Apex can use only 100 records per cycle. The execution of SOQL queries is fast with Batch Apex.
  • Batch Apex retrieves 50,000,000 SOQL queries whereas Normal Apex can retrieve only 50,000 SOQL queries.
  • A Batch Apex contains a heap size of 12MB whereas a Normal Apex contains a heap size of 6 MB only.
  • While executing the bulk records, normal apex classes are vulnerable to encounter with errors as compared to Batch Apex. The latter is normally error-less.

29. What is an external ID in Salesforce? Which all field data types can be used as external IDs?

Ans: When a record uses a unique identifier in a custom field than is known as an external ID. It is mainly used for importing records/ data. While importing records, one field must be marked as an external ID (unique identifier) among many other fields in those records. 

Only the custom fields can be used as External IDs. The fields such as Text, Number, E-Mail and Auto-Number can be marked as external IDs. 

30. What are The Types of Apex Triggers in Salesforce?

Ans: Triggers are divided into two types.

  1. Before Triggers
  2. After Triggers

Before Triggers: These triggers are used to update or validate values of a record before they are saved to the database.

After Triggers: These triggers are used to access field values of the records that are stored in the database and use this value to make changes in other records.

Syntax:

Trigger trigger_name on Object_Name(trigger_events) { Code_block } WHERE trigger_events can be comma separated list of events.

31. Suppose If A Record Meets Workflow Criteria For Time Based Workflow Action, The Action Goes In Queue. Later, Before The Time Based Action Is Triggered, The Same Record Gets Modified And The Criteria Previously Met Is Changed And Now It Does No

Ans: Simply the time based workflow action is removed from workflow queue and will not get fired.

Salesforce Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

32. How To Clear The Time Based Workflow Action Queue?

Ans: We can clear time based workflow action queue in two ways they are

1.Make the criteria false.

2.Removing scheduled actions from the queue.

33. We Have “time Based Workflow” And There Is Action Scheduled To Be Executed. Can We Delete That Workflow?

AnsIt is not possible to delete the workflow when the workflow is having any pending time dependent actions.

34. We Have A “time Based Workflow” And There Is Action Scheduled To Be Executed. If We Deactivate The Workflow, Scheduled Actions Will Be Removed From Queue Or Not?

Ans: Even after deactivating the the workflow, its action will not be removed. It’s still active in queue.

35. In Which Criteria Of A Workflow – “time Dependent Workflow Action” Cannot Be Created ?

Ans: Created, and every time it’s edited.

36. what Is A Workflow Field Update?

Ans: Field updates in workflow and approval processes specifies the field that we want updated and inserting the new value for it. Depending on the field type, we can choose the following options. They are apply a specific value, make the value blank, or calculate a value based on a formula you create.

Subscribe to our YouTube channel to get new updates..!

 

37. What Is A Workflow Alert?

Ans: Email alert is one of the action used in workflow and approval. They are used to generate email template by a workflow rule or approval process and sent to destination recipients. We can send workflow email alerts  to users, contacts having an valid email address.   

38. What Is A Workflow Task?

Ans: Workflow tasks in salesforce are used to assigns a task to users. Using tasks we can specify the Subject, Status, Priority, and Due Date of the task. Tasks are workflow & approval actions that are triggered by workflow rules or approval processes.

39. Different Workflow Components Available In Salesforce?

Ans: In salesforce.com. workflows consists of 5 components they are.

1.Workflow rules.

2.Workflow tasks.

3.Workflow Email alerts.

4.Workflow field updates.

5.Workflow Outbound messages

40. What Is Analytical Snapshot In Salesforce.com ?

AnsAnalytical Snapshot in Salesforce are used to create reports on historical data.

41. How To Enable “floating Report Header”?

Ans: To enable floating report header in salesforce go to Setup=>Customize=>Reports and Dashboards=>User Interface settings=>Click on enable floating report header.

42. What Is The Use Of “floating Report Header”?

Ans: Floating report headers enables us to display the column header visible on each page when we scroll the report page.

43. Which Permission Is Required To Set The Running User Other Than You In Dashboard?

Ans: The user must have “View All Data” permission is required to set the running users.

44. Who Can Access “drag And Drop Dashboard”?

Ans: User who have permissions in managed dashboard can access drag and drop dashboard.

45. Explain Dynamic Dashboard.

Ans: Dynamic dashboards in Salesforce displays set of metrics that we want across all levels of your organization.

Dynamic Dashboards in salesforce are Created to provide security settings for the dashboards in salesforce.com. We may have a requirement in an organization to “view all data” by every user in an organization according to their access we have to select Run as Logged-in User. There are two setting option in Dashboards. They are

1.Run as specified User.

2.Run as Logged-in User.

46. Can We Schedule Dynamic Dashboards?

Ans: No, we can not schedule dynamic dashboards for refresh. It must be done manually.

47. What Are The Different Dashboard Components?

Ans: Salesforce dashboard components are used to represent data. Salesforce dashboards have some visual representation components like graphs, charts, gauges, tables, metrics and visualforce pages. We can use up to 20 components in single dashboard. 

48. What Are Dashboards?

Ans: Salesforce Dashboards are the graphical representation and visual presentation of reports data in salesforce.

49. Is It Possible To Delete Reports Using Data Loader?

Ans: No, it is not possible to delete reports using data loaders.

Salesforce Training

Weekday / Weekend Batches

50. What Is A Bucket Field In Reports?

Ans: In salesforce reports, bucket fields are used to categorize reports records. When we use bucket field in reports there is no need of creating formula or a custom field.

 

51. Who Can Run Reports?

Ans: In Salesforce.com, most reports run automatically when we click on the report name. If we want to run a report click on “Run Report” to run automatically.

52. What Are Custom Report Types?

Ans: Custom report types in salesforce allows us to build framework in the report wizard when creating custom reports. This custom reports can be created between standard and custom objects.

53. What Is Trend Report?

Ans: Trend reports in salesforce are those which displays historical data. Trend reports are used to analyse which fields contains data that we want to leave out.

54. What Is A Matrix Report?

Ans: Matrix reports is salesforce are those where the data is arranged in grid format having rows and columns. Data is arranged vertically and horizontally in tables like excel format.

 [Related articles: Salesforce Career path]

55. What Are Custom Reports?

Ans: Custom reports in salesforce are those created by user with specific criteria. These type of report can be deleted, edited and stores in personal folders.

56. What Are Standard Reports?

Ans: Standard reports in salesforce are those provided by salesforce.com. These type of reports can not be deleted and used primarily for creating custom reports.

 Most Frequently Asked Salesforce Lightning Interview Questions

57. What is Salesforce Lightning?

Ans: Lightning is the compilation of tools and technologies that support an important upgrade of the Salesforce platform. Salesforce Lightning covers: 

Visual Building Tools: Drag and drop technologies help you create and customize apps quickly and easily. The Lightning App Builder is used to personalize the Salesforce1 mobile app and the Lightning Experience. Community Builder is used to personalizing template-based communities.

Experience: A set of modern UI's optimized for speed. It includes the Salesforce1 Mobile app, template-based communities, and Lightning Experience.

Lightning Component Framework: A set of standard components and Javascript framework which enables us to develop reusable components to personalize the Salesforce1 mobile app template-based communities and the Lightning experience and develop our own standalone apps.

Lightning Design System: Best Practices of Modern Enterprise UX and Style Guides to develop perfect pixel apps which will match the appearance of the Salesforce1 Mobile app as well as Lightning Experience.

Lightning Exchange: An AppExchange section where we can find more than 70 partner components to get our development back on track.

 Wish to make a career in the world of Salesforce lightning? Start with Salesforce lightning training!

58. What tools are included with lightning?

Ans: 

Lightning connect: It is an integration tool which enables our Force.com app to more easily consume data from the external source which meets the OData specifications.

Lightning Component Framework: The Components and extensions which enable us to create standalone applications, reusable components and personalize the Salesforce1 mobile applications.

Lightning Process Builder: It is a user interface tool to view and create automated business processes.

Lightning App Builder: It is the new user interface tool that allows us to build applications very quickly with the help of components from Salesforce and platform developers.

Lightning Schema Builder: It is a user interface tool to view and create fields, objects, and relationships.

59. What does the Lightning Data Service mean?

Ans: Lightning Data Service is a set of components, functions, and wire adapters provided by Salesforce. Its objective is to manage the information on behalf of us, making it easy for us to read and write the records and using SDL to reflect these changes in all other components, whether these are standard Salesforce components or our own customized ones built using this technology.

60. What is SDLS?

AnsSDLS refers to the Salesforce Lightning Design System. It is the framework behind the appearance of Salesforce Lightning. It provides design guidance on the operation of components from a user experience perspective along with blueprints of HTML components, including those not existing as basic components of lightning. It is the most commonly used part of it. It provides the stylesheet that enables us to implement consistent styles in the components easily.

61. What is the Aura definition Bundle?

Ans: A bundle includes Aura's definition and the associated resources. The definition may include a component, interface, event, application, or token collection. An Aura definition Bundle component is a folder which includes definition files. In contrast to other metadata components, an AuraDefinition Bundle component is not a single file; it is a set of files. Every file indicates a resource within a bundle, like applications, markup, code files (including helpers and controllers), documentation, events, and interfaces.

62. What is Locker Service?

AnsLocker Service provides a high-performance security architecture for the Lightning components. Locker Service improves safety by separating Lightning components which are part of a component namespace within a different namespace. It also boosts the best practices that enhance the ability to support the code by providing access to the supported APIs and removing access to the non-published framework internals.

63. What is a flexipage?

Ans: FlexiPage is the metadata related to a Lightning page. A Lightning page provides a customizable screen consisting of regions with Lightning components. A Lightning page may have up to 25 components. Flexi pages are stored in the form of XML files and can be deployed with the help of any deployment tool or Metadata API. Lightning pages are called FlexiPages in the API and called Lightning pages elsewhere in the SFDC documentation.

64. When do we use aura:method tag in salesforce lightning?

Ans: can be used for defining a method within the API of a component. This allows us to call a method directly into the client-side controller of a component rather than firing and managing a component event. By using will simplify the required code for a parent component for calling a method to a child component in it.

65. What are the value providers in Salesforce Lightning?

Ans: The Value Providers within the Lightning Component encapsulate the associated values and use them for data access. There are two value providers of a component I\in Salesforce Lightning: v (View) and c (Controller).

  • v is a set of component attributes which assists in accessing component attribute values from the markup.
  • C is the component controller that assists us in connecting with event handlers and actions to the component.

66. List the Global value providers.

Ans: 

  • $Label
  • $Locale
  • $Browser
  • $Resource 
  • $globalID

67. Explain the different kinds of events in the Salesforce lightning components?

Ans: 

Various types of events within the salesforce lightning components are:

Application Event: The extent of the application event is through the lightning application, and the element that has registered for its event will receive an alert.

System Events: Throughout the Lightning App life cycle, Salesforce initiates system events.

Component Event: The scope of the component event lies within itself or in the parent component of that event, So, all parent components will receive an alert.

68. Explain the Lightning component bundles.

Ans: 

Controller: Includes client-side controller methods for managing events within the component.

Component: User interface to the lightning component.

Helper: The JavaScript functions which can be called out of any JavaScript code in the packet of a component.

Document: sample code, Description, and one or more references to the components example.

Style: Includes the component styles. 

Design: Necessary files for components that are used in Lightning pages, Lightning App Builder, or Community Builder.

Renderer: Client-side renderer for overriding the default rendering of a component.

SVG: Custom icon resource to the components that are used in the community Builder, Lightning App Builder.

 Wish to make a career in the world of Salesforce? Start with Salesforce training in Hyderabad!

69. How do Visualforce and Lightning components differ?

Ans: The components of visualforce focus on the page, and the majority of the work is carried out on the server. Lightning is intended from the component up instead of using the page concept as its fundamental unit. The Lightning components are customer-centric, making them dynamic and easy to use.

70. Where can we display the Lightning component?

Ans: 

A number of options exist for the displaying lightning component. 

Lightning Experience: We are able to view the component in the lightning experiment with the help of the App Builder. We may change the home page, modify a record details page, or create or modify a new application page for including it.

Template-based community: we may display the component within the template-based community with the help of the Community Builder.

Salesforce1 Mobile Application: Components in the Salesforce1 Mobile application can be viewed by creating a custom Lightning tab that refers to it and adding this tab to the mobile navigation.

Standalone Lightning application: By creating a standalone Lightning application and including components in that application. Access the Lightning application through URL.

71. What is the fundamental difference between a Component Event and an Application Event?

Ans: 

Component events serve as a means of communicating between the child and the parent. They use bubbling to capture the same thing used in DOM events. A change within a child component may be communicated with the parent component through a component event.

The purpose of application events is to communicate any changes in the component to a wider audience. Any component that has registered to participate in this event will receive a notification.

If you have any doubts on Salesforce lightning, then explore our  blog on Salesforce Lightning !

72. What benefits does lightning have?

Ans: 

The advantages include a set of an event-driven architecture, out-of-box components, and a performance-optimized framework.

Out-of-box component set: Includes a set of ready-to-use components to start building applications. We need not spend our time optimizing our applications for various devices because the components look after them for us.

Rich component ecosystem: Develop ready-to-use components and provide them in Salesforce1, Communities, and Lightning Experience.

Performance: Uses both stateless server and stateful client architecture that relies on client-side JavaScript to manage the user interface. It makes smart use of your browser, server, network, and devices to allow you to concentrate on the interactions and logic of your applications.

Event-driven architecture: This is for improved decoupling among components.

Faster development: Allows teams to work more quickly with out-of-the-box components that work perfectly with mobile devices and desktops.

Cross-browser and aware device compatibility: Its design is responsive and supports the latest browser technologies like HTML5, css3, and touch events.

73. What are the programming models in Lightning components?

Ans: Two different programming models are available for the Lightning components. One of them is the Aura framework for developing Aura components, and the other is the Lightning Web components framework.

74. What data types can be used in Lightning components?

AnsIn the Aura components, we may use any basic data types like String, arrays, object, date, etc. We may define Aura attributes for holding SObjects and moving advanced data types like functions, Apex-defined data types, and we may define an attribute that may store other components. Here things are much simpler because it is not necessary to define data types to our attributes. This indicates that an attribute can hold any of the Javascript data types. For example, we can use any of the standard data types, Promises, HTML Nodes, functions, and anything that we need.

75. What are the phases of events?

Ans: 

There are three phases to events: Bubbling, Capture, and Default.

Bubbling phase: In this phase, the event goes up the DOM on the way, notifying the event listener. It means the innermost elements are the first event handlers to run.

Capturing phase: The will travel fromto[ to the bottom of the DOM. First, it calls the outermost event handler.

Default Phase: This is the third phase. At this phase, the event handlers are called non-deterministically.

By default, the events triggered by Lightning components make their appearance and are handled by their parent component, whatever the phase.

76. What is Aura, and How can we use aura: namespace?

Ans: Aura is an open-source technology that operates lighting components. Aura: namespace includes all primary building blocks for defining applications and components.

77. What are attributes and variables? What parameters are required when defining the attributes?

Ans: Attributes are variables used to store values. We need to define the Name, Type, Access, Default, and Description fields within the attribute definition. Only Name and Type are the parameters needed in the attribute definition.

78. What types of Lightning Record pages are available, and how can we create them?

Ans: 

We can build Lightning record pages with the help of Lightning App Builder. Below are various types of lightning record pages:

  • App Page
  • Home page 
  • Record page

79. What is @AuraEnabled Annotation?

Ans: The @AuraEnabled annotations make it possible to Lightning components for accessing Apex methods and properties. AuraEnabled Annotation is overloaded, which can be used for various purposes. AuraEnabled is used over Apex class static methods to access them, like the remote control actions within our lightning components. @AuraEnabled is used over Apex Instance properties and methods to make them serializable when we want to return the class instance as server-side action data.

80. What is Scratch org?

Ans: Scratch org is a scalable salesforce org which is used for testing and development. The default duration for Scratch org is seven days. We can create a scratch org after 30days after the date we have deactivated the Scratch org.

About Author

Ishan is an IT graduate who has always been passionate about writing and storytelling. He is a tech-savvy and literary fanatic since his college days. Proficient in Data Science, Cloud Computing, and DevOps he is looking forward to spreading his words to the maximum audience to make them feel the adrenaline he feels when he pens down about the technological advancements. Apart from being tech-savvy and writing technical blogs, he is an entertainment writer, a blogger, and a traveler.

Upcoming Salesforce Training Online classes

Batch starts on 28th Feb 2024
Mon & Tue (5 Days) Weekday Timings - 08:30 AM IST
Batch starts on 3rd Mar 2024
Mon - Fri (18 Days) Weekend Timings - 10:30 AM IST
Batch starts on 7th Mar 2024
Mon & Tue (5 Days) Weekday Timings - 08:30 AM IST
To Top