Javatpoint Logo
Javatpoint Logo

Salesforce interview questions

Salesforce Interview Questions

A list of top frequently asked Salesforce Interview Questions and answers are given below.

1) What is Salesforce?

Salesforce is a cloud-based service. It is a customer relationship management (CRM) platform. Salesforce is a software as a Service (SaaS). It helps you to manage customer relationships, integrate with other systems, and build apps. The tool helps you to manage and create a custom solution as per your business requirement.

Salesforce Interview Questions

Before Salesforce, companies had their servers for customer relationship management (CRM). They were costly and time taking. They were very hard to use. Feasible solution to this problem is to build an affordable CRM software and delivering it entirely online as a service.

In a few years, there has been a significant surge in cloud computing technologies. Salesforce has an immense impact on the world of computing. Salesforce is developed as the fifth largest software company in the world. It is the top CRM service provider.


2) What is an app in Salesforce?

An app is a collection of tabs that works as a unit to provide functionality. Users can switch between apps in force.com app's drop-down menu.

A Salesforce application is a container of tabs, processes, and services.

We can create new apps by grouping some standard app, customize existing apps according to our work.

Salesforce provides many standard apps such as call center, marketing, sales, etc.

There are two types of Salesforce application:

  • Custom App
  • Service cloud control

Salesforce create application

Follow the below steps to create a Salesforce app:

Step1: Follow this navigation: Setup-> AppSetup-> create-> apps-> click on 'new'

Step2: Select custom application radio button-> provide the app name

Step3: Click on the next button

Step4: Select the image from the document object

Step5: Select the objects

Step6: Click on the visible checkbox and save

To add this Salesforce app to any other profiles or tabs. Follow the below steps

Step1: Setup-> Appsetup-> create-> apps->

Step2: Select the app from the list and click on edit

Step3: If we want to change the image, then click on insert an image and take the image from documents.


3) What are objects in Salesforce?

Objects are the database tables in Salesforce. Objects allow storing data specific to the organization in Salesforce.

There are two types of objects in Salesforce:

  • Standard objects
  • Custom objects

Standard objects

Standard objects are such objects that are inbuilt in Salesforce.com.

Example: accounts, contacts, products, leads, opportunities, campaigns, users, contracts, Report, and dashboards, etc.

Custom objects

Custom objects are such objects that are created by us. These objects are user-defined objects. Custom objects store information which is important and unique to our organization.

Custom objects are an integral part of any application. They provide a structure for sharing data.

Custom objects hold the following properties.

  • Custom fields
  • Relationship to other objects
  • Page layouts
  • A custom user interface tab

4) What are user profiles in Salesforce?

User profiles are a group of permissions and settings which provide lightning access to a user. Salesforce admins can assign the users with a profile depending upon their job roles. The user profile includes all the tabs, records, and page access that user require.

You can set up and manage the profile by which you can conventionally create a secure boundary that dictates user's access rights.


5) Can we assign the same profile to two different users? Is it possible that two profiles can be assigned to the same user?

The profile defines the level of access a user can have in Salesforce.

In Salesforce org, it is possible to assign a single profile to any number of users. For example, we can consider a sales or service team in a company. The entire team has access to the same profile. The admin can create one profile for the whole sales team, which will have access to the leads, campaigns, contacts, and other objects deemed necessary by the company.

In this functionality, many users can be assigned with the same profile. In case the team leader needs access to additional records, then it can be done by assigning permission sets only for those users.

Each user can be assigned only one profile.


6) What is the difference between Force.com and Salesforce.com?

Salesforce.com is a software as a service (SaaS), and Force.com is a platform as a service (PaaS).


7) What is the relationship in Salesforce? What are its types?

We can establish a relation between objects in Salesforce. We can associate one object with others.

Example: We have an object party (To store information about the party), and you want to associate it with other objects like people (information of participants) so that you can associate the object party with people. These relationship types also determine how they handle record sharing, required field in page layouts, data deletion capability.

Salesforce supports the following types of relationships that can be established among objects.

  • Master-Detail Relationship
  • Lookup relationship
  • Self-relationship
  • External lookup relationship
  • Indirect lookup relationship
  • Many-to-Many relationship
  • Hierarchical relationship

8) What is Master-detail relationship?

It's a tightly coupled relationship among Salesforce objects. In the Master-detail relationship, the parent record controls the behavior of the child record regarding visibility and sharing. If a master record gets deleted, then the child records associated with it are also deleted. The security setting of the parent object applies to the child object.

Example:

If we create a Master-detail relationship between the objects party and people. Where a party is a parent object, and people is a child object. Then if we delete party record, all the associated record will also get deleted.

Salesforce Interview Questions

When two objects form a Master-detail relationship, we can create a unique type of field over the master object, called Roll-up summary.

A Roll-up summary allows us to calculate values related to child record, such as the number of child record, average, sum, etc., linked to a parent record.


9) What is the lookup relationship?

It's a loosely coupled relationship among Salesforce objects. In the Lookup relationship, both parent and child have their sharing setting and security controls, which means if a parent record gets deleted, then child records remain in the system.

Let's see the party and the people objects. For example, the below figure provdes a visual representation of the Lookup relationship between the party and people objects.

Salesforce Interview Questions

In this diagram, the party object record has been deleted, but the people record is still available. This relationship between objects is Lookup relationship.


10) What are reports in Salesforce?

Reports are an essential part of any business. Descriptions provide a clear picture of the management.

Reports are used to track the process towards its various tasks, control expenditure, increase revenue. Reports help in trend prediction.

Salesforce.com allows you to generate reports in different styles.

In Salesforce.com, we can create four types of reports:

  • Tabula reports
  • Summary Reports
  • Matrix report
  • Joined report

11) What are some Governor limits in Salesforce?

Governor limits control how much data and how many records you can store in the shared databases because Salesforce is a multi-tenant architecture based. In other words, Salesforce uses a single database to store the data of multiple customers.

Salesforce introduced the concept of the Governor limits to prevent monopolization of the shared resources between users.

Governor limits are the biggest challenge of a Salesforce developer. This is because if the apex code exceeds the limit, then the issue is a runtime exception that can't be handled. So as a Salesforce developer, you should be very careful while developing application.

Here is a list of some significant Governor limits.

  • Pre-transaction Apex limits
  • Static Apex limits
  • Size-Specific Apex limits
  • Miscellaneous Apex limits
  • Force.com Platform Apex Limits
  • Email limits
  • Push Notification limits

12) What are the different ways to store various types of records in Salesforce?

There are many different ways in Salesforce to store various records, such as Images, files, and documents. Some of them are as follows:

  • Attachment
  • Google drive
  • Chatter files
  • Libraries

13) What is the fiscal year in Salesforce?

Starting and ending date of a company financial year is considered as Fiscal year. The fiscal year is used to calculate annual financial statements in business and other organizations. Salesforce has two types of the fiscal year:

  • Standard Fiscal year
  • Custom Fiscal year

Standard fiscal year

Salesforce provides a calendar by default as the standard fiscal year. It's a Gregorian calendar. But it is not necessary that all the organizations use the same calendar, some organizations use different calendars and need to change the fiscal year start month. It can be defined whether the fiscal year is based on the start or end of the selected month.

To set up a standard fiscal year navigate to

Select the option of Standard Fiscal year

Custom fiscal year

When the standard fiscal year does not meet the requirements of the organization, then Custom fiscal year is used. To use the custom fiscal year, the administrator has to enable it. The administrator must define the fiscal year to fit the company's calendar.

To set up the company's fiscal year, navigate to

Select the option of Custom Fiscal year

Select the checkbox next to the terms statement

Click on Enable custom fiscal year

Click on OK


14) How many Master-detail relationship fields can be created in an object?

There is a maximum of two Master-detail relationship fields possible in an object.


15) How many Lookup relationship fields can be created in an object?

There is a maximum of 40 Lookup relationship fields possible in an object.


16) What are the benefits of the Salesforce?

Salesforce is the largest and leading cloud platform provider in the world. Their customer relationship manager (CRM) is one of the most beneficial software.

We get the following benefits by using CRM

  • Improved understanding of the organization
  • Enhanced communication b/w client and service provider
  • We can facilitate the customer better by understanding them.
  • Salesforce automates the repeated tasks.
  • Salesforce reduces cost and cycle time.
  • Salesforce improves the efficiency of teams.

17) What is a sandbox org? What are the different types of sandboxes in Salesforce?

A sandbox is a copy of the production org/environment. It is used for testing and development purpose. It is beneficial because it allows for the development of Apex programming without disturbing the production environment.

Sandbox can be used when we want to test a newly developed force.com application. We can develop and test it in the sandbox org, there is no need to do it directly in production.

There are four types of sandboxes are in Salesforce.com:

  • Developer
  • Developer Pro
  • Partial Copy
  • Full

18) What is Apex in Salesforce?

Apex is a strongly typed object-oriented programming language. It allows developers to execute flow and transaction control statements on Salesforce server in combination with calls to the API. Its syntax looks like Java. It uses syntax and acts as a database stored procedure. Apex allows the developer to add business logic to system events like button clicks, related record update, and Visualforce pages.


19) What is Visualforce?

Visualforce is a framework for the Force.com platform. It is a component based markup language. It allows defining user interface component in Salesforce. Page layout feature will enable you to configure the user interface easily, but by using Visualforce pages, you can customize your user interface.


20) Can you edit an apex trigger/ apex class in a production environment? Can you edit a Visualforce page in a production environment?

No, we can't edit apex classes and triggers directly in the production environment.

To edit an apex trigger/ class, first, it needs to be done in Developer edition or testing org or Sandbox org. Then, we can deploy it in production. A user that has apex permission must deploy the triggers and classes using deployment tools.

Though, Visualforce page can be created and edited in both production and sandbox.


21) Why are Visualforce pages served from a different domain?

Visualforce pages are served from a different domain to block cross-site scripting and improve security standard.


22) What are the static and dynamic dashboards? Can dynamic dashboards be scheduled?

Static dashboards are the ordinary dashboards that will be visible to any other user who has made a report out of his data. Example; sales managers/ marketing manager would be able to see on his Salesforce Org. Moreover, a normal dashboard that shows the data for a single user.

Dynamic dashboards display information which is customized for a specific user. Let's consider the above example. In case the sales manager wants to view the report of a particular team member, then he can use dynamic dashboards.

We can use dynamic dashboards when we want to show user-specific data such as a particular user's quota, sales, productivity, meetings, etc.

We can use a normal/ static dashboard to show regional and organization-wide data to a set of users, such as sale in a region, or team performance, etc.


23) Which fields are automatically indexed in Salesforce?

Following fields are automatically indexed in Salesforce:

  • Primary keys (id, name and owner fields)
  • Foreign keys (master-detail or lookup fields)
  • Audit keys (Such as SystemModStamp)
  • Custom fields ( These fields Patent as an External ID or a unique area)

24) What are skinny tables?

Salesforce can create skinny tables to avoid join and contain frequently used fields. Thin tables improve the performance of read-only operations. Skinny tables are set aside in sync with their source tables when the source table is modified.

Contact Salesforce customer support to use skinny tables. These tables are created and used automatically where appropriate. We can't create, modify, or thin access tables.

Considerations for skinny tables

  • It can contain a maximum of 100 columns.
  • Tables cannot contain fields from other objects.

25) What is an Audit trail in Salesforce?

The Audit trail tracks the recent setup changes that other administrators and you have made to your organization. This is useful for organizations that have more than one administrator.

It can track the last twenty changes made to your organization. It displays

  • The date and time of the change.
  • Who made it (administrator name)
  • What was before the change

26) Can we delete a user in Salesforce?

No, it is not possible to delete the user in the salesforce.


27) Can we change the license when we create a profile?

No, we cannot change the license after creating the profile.


28) What is Deployment in Salesforce?

In SFDC (Salesforce development cycle), you have to develop code in Sandbox, and then you might need to deploy this to another sandbox or production environment this is called deployment.

In other words, the movement of metadata from one organization to another organization is called deployment. The main reason behind deployment is that you cannot develop apex in your Salesforce production.


29) What are the different ways of deployment in Salesforce?

Deployment can be done in the following ways.

  • Change Sets
  • Eclipse with Force.com IDE
  • Force.com Migration Tool - ANT/Java based
  • Salesforce Package

30) What is the difference between a standard controller and a custom controller?

The standard controller automatically contains all the standard object properties and standard button functionality. It contains all the functionalities and logic as used in standard Salesforce pages.

Custom controllers are like an Apex class that implements all the logic of a page without taking an advantage of a standard controller. Custom controllers are related with Visualforce page through the controller attribute.


31) What is cloud computing?

Cloud computing is the provision of computational services such as storage, servers, database, software, networking, analytics, intelligence, and moreover the internet (cloud). It brings the organization faster innovation, flexibility in allocating resources, economies of scale. It reduces the costs of organizations that are associated with the task of storage.

Cloud-based storage makes it possible to save the files in a remote database instead of proprietary hard drive or local storage device. It provides access to the data and the software programs to run it till an electronic accessory has access to the web.

Cloud services can be both private and public. Private cloud services provide services to a certain number of people. On the other hand, public cloud services offer their services over the internet which is chargeable. These services are a group of networks that supply hosted services. Cloud services also provide a hybrid option, which combines both private and public services.


32) What are the types of Cloud services?

Based on services, cloud services provide users with a series of functionalities like

  • Email
  • Backup, Storage, and data retrieval
  • Creating and testing app
  • Data Analyzing
  • Audio and Video streaming

Cloud computing is still a new service, but it comes in a trend in a very short time. Nowadays, government agencies, small businesses, non-profit agencies, and individual consumers are using cloud computing.

Cloud computing is not a single part of technology like a microchip. It's a primary combination of three services software as a service (SaaS), infrastructure as a service (IaaS), and platform as a service (PaaS)


33) How many certifications are available in Salesforce?

There are eight kinds of certifications available in Salesforce which cater to different stages:

  • Administrator certifications
  • Developer Certifications
  • Architects Certifications
  • App Builders Certifications
  • Implementation Experts or Consultant Certification.
  • Marketers Certification
  • Pardot Experts Certifications
  • CPQ Certification

34) What is Salesforce environment?

Environment or organization is the workspace for a particular user.

For Example, if you sign up to a Facebook account, you will be provided a unique username and password. The same approach, if you subscribe to the Force.com cloud computing, you will be provided a valid credential to work in your specified cloud computing area of the environment or Org.

The Salesforce environment provides accessibility to develop, test the apps, and can be used for production also. This environment can be customized according to your requirements such as Apex code, workflow, Custom DB attributes, and objects.


35) How to check for user License in Salesforce work environment?

To check the Salesforce license, open the SF workspace and navigate as follows:

And go to Data Storage section, here you can see the user license in the highlighted area.

If you want to check for all user licenses, then select the "Show All" option.


36) What is MVC architecture in Visualforce?

MVC is a widely used architecture design pattern which divides the design component in three phases Model, View, Controller.

Salesforce Interview Questions

In Visualforce MVC, architecture can be implemented by using the standard as well as custom objects. Also, we can use three newly introduced Salesforce objects, pages, components, and controllers.

These pages work like JSP pages, give the user-friendly presentation. Each view has an associated controller. Developers can write their controller using Apex programming language or can use a standard controller. VF has some auto-generated controller to interact with databases.


37) When should apex be used?

Apex can be used in different scenarios, such as

  • To create Email services
  • To create web services
  • To perform complex validation over multiple objects
  • To create complex business processes that are not supported by the workflow.
  • To create custom transaction logic
  • To attach custom logic to another operation

38) How does Apex work?

All Apex programs run on-demand exclusively on force.com platform.

First, the application server compiles the apex code into an abstract set of instructions that can be understood by apex runtime interpreter.

After the compilation, the compiled code is stored to metadata.

And now, when the end users initiate the execution of apex by clicking the button or visual force page, the application servers retrieve the compiled instructions from the metadata and forward them to runtime interpreter before returning the result.


39) What are the types of SOql statements in Salesforce?

Salesforce Object Query Language is used to perform database operations in Salesforce.com. It is similar to the select statement in the widely used Structured Query Language (SQL), but it is designed especially for Salesforce data.

With the use of SOql, we can create a simple but powerful query string in the following environments:

  • In the query call () of the query String parameter.
  • In apex statements
  • In Visualforce controllers and getters method
  • In the schema explorer of Force.com IDE

40) What could be the reason to lose data in Salesforce?

Few reasons to loss data in Salesforce are as follows:

  • By changing date and date-time
  • By migrating number, percent, currency from another datatype.
  • By changing from the multi-select picklist, checkbox, auto number to other types.
  • By altering the multi-select picklist from any type except picklist
  • By changing to auto number except for the text
  • By switching from text area to email, URL, phone, and text.

41) What is Workflow?

The workflow is a programmed process which is used to validate evaluation criteria and rule criteria.


42) What is the difference between WhoID and WhatId?

"WhoID" denotes the people like contacts or leads. Whereas "WhatId" denotes the objects. Let us consider LeadID, ContactID are fields of "WhoId" and AccountID, OpportunityID are "WhatId".


43) What is Data Skew in Salesforce?

When a maximum number of child records (more than 10k) are connected to one parent record that situation is called data skew in Salesforce.

Data skew can be three types

  • Account data skew
  • Ownership skew
  • Lookup skew

44) What is collection in Apex? List out all different kinds of collections supported by Salesforce?

Collections in Apex are variables that are used to store multiple data records. As there is a limitation on the number of records to be retrieved per transaction, we can use the collection variable to retrieve records.

There are three types of collections in Salesforce.

  • List
  • Maps
  • Sets

45) What are static Resources?

Static resources are used to upload images, zip files, jar files, Javascript and CSS files that can be referred in a visual force page. We can upload a maximum of the 250mb file using Static resources.


46) What is the difference between Action support and Action function?

To understand the difference between Action support and Action function, let's understand their functionalities:

Both Action support and action function are used to call a controller method via an Ajax request.

The difference between them is as follows:

  • Action function can call a controller method from JavaScript.
  • Action function provides Ajax that supports another visualforce component and then call the controller method.
  • Action function cannot support Ajax to another component. But from a particular component which supports Ajax (onclick, onblur, etc.) action function can be called to the controller method.

47) How many types of email templates can be created in Salesforce?

Different types of email templates can be created In Salesforce. Some of them are listed below.

HTML with letterhead

People who are having "Edit HTML Templates" permissions can create this template based on the letterhead.

Custom HTML

People who are having "Edit HTML Templates" permissions can create this template without any letterhead.

Visualforce

Only the administrator and developer can create this template. It provides some advanced functionalities like merging data from multiple records is available only in this template.


48) How to handle comma within a field while uploading using Data Loader?

If there is a comma in field content, you will have to enclose the contents within double quotation mark;" ".


49) How many callouts to external service can be made in a single Apex transaction?

An Apex transaction can make a maximum of 100 callouts to an HTTP request or an API call after that governor limits will restrict it.


50) What is pagination in salesforce? How can we implement it in Visualforce?

Pagination is a technique to display a large number of records and displaying the records on multiple pages. We use pagination instead of controlling the number of records displayed on each page.

By default, a list controller shows 20 pages in a page. To customize it, we use a controller extension to set the Page Size.

Take a look at the below sample code: