Interview Questions Admin & Dev. For Salesforce
Interview Questions Admin & Dev. For Salesforce
Answers 2022
By Ankush Dureja in salesforce, Salesforce interview questions
January 29, 2022
In this post, we will try to cover all Salesforce interview questions and
answers related to Salesforce Admin, Salesforce Development, Salesforce
Lightning.
What is Salesforce?
What is Cloud computing?
What is CRM?
What are some CRM provider
What are different types of cloud computing?
What is PaaS?
What is SaaS?
What is IaaS?
What are different Salesforce Editions?
What is difference between Salesforce.com and Force.com?
What is Database.com?
What is App in Salesforce?
What is an object in Salesforce?
Different types of object in Salesforce.com?
How many relationship types are in Salesforce?
What is Master-detail relationship?
What is Many-to-many relationship?
What is External lookup?
What is Indirect lookup?
What is Hierarchical relationship?
What is a roll-up summary field?
What are different Levels of data access in Salesforce?
What is Organization-wide defaults?
What is role hierarchy?
What are the difference between a Role and Profile?
What are Sharing Rules?
What is Manual sharing?
What is Profile?
What are standard profiles?
What is Permission Set?
What is “View all” and “Modify all” permission?
Is it possible to restrict permission for users using permission set?
If a user does not have access to a specific record type, will they be
able to see the records that have that record type?
What are Salesforce Reports?
What are the different Report Formats?
What is Tabular Report?
What is Summary Report?
What is Matrix Report?
What is Joined Report?
What is Conditional Highlighting in Salesforce report?
What is Bucket Field?
Which field type does Bucketing field support?
What are Dashboards?
What are the different Dashboard Component?
What is Workflow?
What are the types of Workflow actions?
What is Time-dependent Workflow?
What is Approval Process?
What are Assignment Rules?
What are Queues?
What are Auto-Response Rules?
What is Escalation Rules?
What is Chatter in Salesforce?
What is Integration?
What are possible Ways to Integrate with Salesforce Force.com?
What is webservices?
What is Protocal ?
How many types of API’s avaliable in salesforce?
When to Use REST API
When to Use SOAP API?
When to Use Chatter REST API
When to Use Streaming API
When to Use Apex REST API
When to Use Apex SOAP API
When to Use Tooling API
What is Call In and Call Out?
What is WSDL ?
What is difference between Enterprise WSDL and Partner WSDL?
How SOAP can be accessed ?
How to generate WSDL file?
How to consume external WSDL file
What is remote site settings ?
How manys ways to XML parsing ?
How to read root element in XML DOM ?
How to read child element in XML DOM ?
How to read all child elements in XML DOM ?
How to read text between tags ?
How SOAP and REST will Communicate ?
What are methods in REST
What is difference between SOAP and REST?
What is JSON ?
What is a Trigger?
What is Trigger Syntax?
What are the various event on which a trigger can fire?
What are different type of Triggers?
What are the considerations while implementing the Triggers?
What are context variables in triggers?
How is Trigger.New Different from Trigger.newMap?
How is Trigger.new different from Trigger.old?
Can a trigger call a batch class?
Can a trigger make a call to Apex callout method?
Define Recursive Trigger and how to avoid it?
What do you mean by the bulkifying trigger?
Is there any limit on number of triggers define on an object?
Can you explain the order of execution in Triggers?
What is Salesforce Lightning?
What are the tools included in lightning ?
What is Aura? Why do I see the aura: namespace in the code?
Is Lightning an MVC framework?
What is difference between Visualforce Components and Lightning
Components?
Where we can display lightning component?
What are the different Lightning component bundles?
What is Lightning Experience?
What is Lightning Design System?
What happens to my existing Visualforce Pages?
What are the type of events into Salesforce Lightning component?
What is the basic difference between Application Event and Component
Event?
Component events vs Application events. Which one I should use?
What is aura definition bundle?
What is the use of implements in lightning component?
Which interface we are supposed to implement so that a lightning
component can be used as a Tab?
Which interface we are supposed to implement so that a lightning
component can be used as quick action?
Which interface we are supposed to implement so that a lightning
component can be used in Community builder?
What is use of @AuraEnabled annotation
Can we Include One Lightning component to another ?
How can we use Lightning Components with the Salesforce1 Mobile
App ?
How can we use a lightning component in a VisualForce Page?
Can we integrate Lightning components with another framework like
Angular?
Can we include external JavaScript/CSS libraries like jQuery, bootstrap
in components?
What is use of aura:method tag in salesforce lightning?
How to ensure FLS while working with Lightning Component?
How can we display loading spinner in lightning component?
How can we conditionally display content in lightning component?
What is the use of force:hasRecordId interface?
How to get current record id in lightning component?
What is a FlexiPage in lightning?
How can we deploy lightning components?
What Is Lightning Data Service?
What is Locker Service in Salesforce Lightning?
What are value providers in Salesforce Lightning ?
What are List of Global value providers in lightning?
How to create popup in lightning component?
What is Salesforce?
What is CRM?
Salesforce CRM.
Microsoft Dynamics CRM.
Oracle CRM.
SAP CRM.
Sage CRM.
NetSuite CRM.
Oracle CRM on Demand.
SugarCRM.
What is PaaS?
The branch of cloud computing that allows users to develop, run, and
manage applications without having to get caught up in code, storage,
infrastructure and so on.
There are several types of PaaS. Every PaaS option is either public, private,
or a hybrid mix of the two. Public PaaS is hosted in the cloud, and its
infrastructure is managed by the provider. Private PaaS, on the other hand, is
housed in onsite servers or private networks and is maintained by the user.
Hybrid PaaS uses elements from both public and private and is capable of
executing applications from multiple cloud infrastructures.
What is SaaS?
What is IaaS?
Essentials: Designed for small businesses that want to get started with
a CRM system quickly. It includes intuitive walkthroughs and a setup
assistant to get started, an easy-to-use UI, and administration tools to
customize your deployment as you grow.
Professional: Designed for businesses requiring full-featured CRM
functionality. It includes straightforward and easy-to-use customization,
integration, and administration tools to facilitate any small to midsize
deployment.
Enterprise: Meets the needs of large and complex businesses. It gives
you advanced customization and administration tools, in addition to all
the functionality available in Professional Edition, that can support
large-scale deployments. Enterprise Edition also includes access to
Salesforce APIs, so you can easily integrate with back-office systems.
Unlimited: Maximizes your success and extends it across the entire
enterprise through the Lightning Platform. It gives you new levels of
platform flexibility for managing and sharing all your information on
demand. Includes all Enterprise Edition functionality, Premier Support,
full mobile access, unlimited custom apps, increased storage limits, and
other features.
Developer: Provides access to the Lightning Platform and APIs. It lets
developers extend Salesforce, integrate with other applications, and
develop new tools and applications. Developer Edition also provides
access to many of the features available in Enterprise Edition.
Salesforce.com and fore.com are relatively same but they are different in
their functionality. Salesforce.com is used to develop CRM functionality
based application where force.com is used to customize our data model,
business logic and User interface.
What is Database.com?
We can create new application and also customization for the existing apps
in Salesforce.com. To create new app in sfdc go
to Setup=>Build=>Create=>App.
Master-detail
Many-to-many
Lookup
External lookup
Indirect lookup
Hierarchical
Master-detail closely links objects together such that the master record
controls certain behaviors of the detail and subdetail record. For example,
you can define a two-object master-detail relationship, such as Account—
Expense Report, that extends the relationship to subdetail records, such as
Account—Expense Report—Expense Line Item. You can then perform
operations across the master—detail—subdetail relationship.
Hierarchical A special lookup relationship available for only the user object.
It lets users use a lookup field to associate one user with another that does
not directly or indirectly refer to itself. For example, you can create a custom
hierarchical relationship field to store each user’s direct manager.
For more details, please refer to this link Object Relationships Overview
For your whole org, you can maintain a list of authorized users, set password
policies, and limit logins to certain hours and locations.
You can restrict access to certain fields, even if a user has access to the
object. For example, you can make the salary field in a position object
invisible to interviewers but visible to hiring managers and recruiters.
You can allow particular users to view an object, but then restrict the
individual object records they’re allowed to see. For example, an interviewer
can see and edit her own reviews, but not the reviews of other interviewers.
You can manage record-level access in these four ways.
Organization-wide defaults
Role hierarchies
Sharing rules
Manual sharing
It give access for users higher in the hierarchy to all records owned by users
below them in the hierarchy. Role hierarchies don’t have to match your
organization chart exactly. Instead, each role in the hierarchy should
represent a level of data access that a user or group of users needs.
Roles are one of the ways you can control access to records. They also
impact reports (e.g. “My Teams” filter). Roles come into play if your security
model (OWDs) are set to private.
Profiles help determine record privileges. Assuming the User can see the
record, Profiles determine what the User can do, view or edit on that record.
Profiles control other system privileges as well (mass email, export data, etc)
In simple words, Roles are one of the ways you can control access to records
and Profiles determine what the User can do, view or edit on that record.
What is Profile?
Each user has a single profile that controls which data and features that user
has access to. A profile is a collection of settings and permissions. Profile
settings determine which data the user can see, and permissions determine
what the user can do with that data.
Profiles usually match up with a user’s job function (for example, system
administrator, recruiter, or hiring manager), but you can have profiles for
anything that makes sense for your Salesforce org. A profile can be assigned
to many users, but a user can have only one profile at a time.
Read Only
Standard User
Marketing User
Contract Manager
System Administrator
Permission sets make it easy to grant access to the various apps and custom
objects in your org, and to take away access when it’s no longer needed.
Users can have only one profile, but they can have multiple permission sets.
View all and Modify all permissions are usually given to system administrator.
When you grant “View All” or “Modify All” for an object on a profile or
permission set, you grant any associated users access to all records of that
object regardless of the sharing and security settings.
In essence, the “View All” and “Modify All” permissions ignore the sharing
model, role hierarchy, and sharing rules that the “Create,” “Read,” “Edit,” and
“Delete” permissions respect. Furthermore, “Modify All” also gives a user
the ability to mass transfer, mass update, and mass delete records of that
specific object, and approve such records even if the user is not a
designated approver.
These tasks are typically reserved for administrators, but because “View All”
and “Modify All” let us selectively override the system, responsibilities that
are usually reserved for the administrator can be delegated to other users in
a highly controlled fashion.
No, Permission Set always extends the permission. It does not restrict
permission to users.
Yes, Record type controls only visibility of record on UI but not its access to
users. If user does not have access to record type then user will not be able
to create records for that record type using UI. But user will we able to see
records if they have appropriate permission to do so.
For more details about security questions for Salesforce admin interview
questions, refer to my previous post Salesforce security interview questions
It is the simplest and fastest report formats. It displays the rows as records
and fields are listed as columns just like a spreadsheet. It supports sorting of
records.
This report allows the user to group rows of data, summarize the field value
which also supports sorting and display subtotals.
What is Matrix Report?
In this report, records are summarized in a grid format. It allows the records
to be grouped by both columns and rows.
In this type of report, User can create multiple report blocks that provide
different different views of your data. In this format of report, we organize
the data in the form of block. You can add upto 5 blocks in a single report.
Each block is defined as a Sub-report(Report Type). It can have its own field,
columns, sorting and filtering.
Scatter Chart, Line Chart, Funnel Chart, Vertical Bar Chart, Donut Chart,
Horizontal Bar Chart, Pie Chart, Gauge, Metric, Table, Visual force Pages.
What is Workflow?
Workflow rules are the automated process used in business process to send
Email Alerts, Assign a Task, Update a field on rule criteria or action based
criteria requirements.
Approval Process are used in the business process to Approve or Reject the
record.
It involves Approval or Rejection of records, where one person creates the
record and
submits that record for Approval.
Escalation Rules , Automatically escalate cases to the right people when the
cases aren’t solved by a certain time.
What is Integration?
What is webservices?
What is Protocal ?
REST API
SOAP API
Bulk API
Streaming API
Metadata API
Chatter REST API
User Interface API
Analytics REST API
Apex REST API
Apex SOAP API
Tooling API
For example, you can use SOAP API to integrate Salesforce with your org’s
ERP and finance systems. You can also deliver real-time sales and support
information to company portals and populate critical business systems with
customer information.
Use Chatter REST API to display Chatter feeds, users, groups, and followers,
especially in mobile applications. Chatter REST API also provides
programmatic access to files, recommendations, topics, notifications,
Data.com purchasing, and more. Chatter REST API is similar to APIs offered
by other companies with feeds, such as Facebook and Twitter, but it also
exposes Salesforce features beyond Chatter.
Use Chatter REST API to display Chatter feeds, users, groups, and followers,
especially in mobile applications. Chatter REST API also provides
programmatic access to files, recommendations, topics, notifications,
Data.com purchasing, and more. Chatter REST API is similar to APIs offered
by other companies with feeds, such as Facebook and Twitter, but it also
exposes Salesforce features beyond Chatter.
Use Streaming API to receive near-real-time streams of data that are based
on changes in Salesforce records or custom payloads. For Salesforce record
changes, Salesforce publishes notifications when the changes occur. For
custom notifications, you can publish event messages. Subscribers can
receive notifications using CometD—an implementation of the Bayeux
protocol that simulates push technology. Clients can subscribe to some
types of events with Apex triggers or declaratively with Process Builder and
flows.
When to Use Apex REST API
Use Apex REST API when you want to expose your Apex classes and
methods so that external applications can access your code through REST
architecture. Apex REST API supports both OAuth 2.0 and Session ID for
authorization.
Use Apex SOAP API when you want to expose Apex methods as SOAP web
service APIs so that external applications can access your code through
SOAP.
Apex SOAP API supports both OAuth 2.0 and Session ID for authorization.
What is WSDL ?
WSDL (Web Services Description Language) is an XML document that
describes a web service. WSDL is derived from Microsoft’s Simple Object
Access Protocol (SOAP) and IBM’s Network Accessible Service Specification
Language (NASSL). WSDL replaces both NASSL and SOAP as the means of
expressing business services in the UDDI registry. It is used in combination
with SOAP and XML Schema to provide web services over the Internet. A
client program connecting to a web service can read the WSDL to determine
what functions are available on the server. Any special datatypes used are
embedded in the WSDL file in the form of XML Schema. The client can then
use SOAP to actually call one of the functions listed in the WSDL. There are
two types of WSDL in Salesforce:
Enterprise WSDL
Partner WSDL
Enterprise WSDL
Partner WSDL
SOAP can be communicate through WSDL file, without WSDL file we can’t
do integration.
Message format in SOAP is XML
Remote site settings is used to authorize the endpoint and allow us to whom
integrate(end user)
getroot element
getchild element
getchild elements
gettext
The SOAP message itself consists of an envelope, inside of which are the
SOAP headers and body, the actual information we want to send. It is based
on the standard XML format, designed especially to transport and store
structured data. SOAP may also refer to the format of the XML that the
envelope uses. SOAP is a mature standard and is heavily used in many
systems, but it does not use many of the functionality build in HTTP. While
some consider it slow, it provides a heavy set of functionality which is a
necessity in many cases. It might now be the best solution for browser-
based clients, due to its custom format.
What is JSON ?
JSON stands for JavaScript Object Notation. JSON is light weighted than
XML. When exchanging data between a browser and a server, the data can
only be text. JSON is text, and we can convert any JavaScript object into
JSON, and send JSON to the server.
What is a Trigger?
Apex triggers enable you to perform custom actions before or after events to
records in Salesforce, such as insertions, updates, or deletions. Just like
database systems support triggers, Apex provides trigger support for
managing records.
Use triggers to perform tasks that can’t be done by using the point-and-
click tools in the Salesforce user interface. For example, if validating a field
value or updating a field on a record, use validation rules and workflow rules
instead.
2 code_block
3 }
before insert
before update
before delete
after insert
after update
after delete
after undelete
All triggers define implicit variables that allow developers to access run-time
context. These variables are contained in the System.Trigger class.
Following are the context variable available in triggers. Please note variable
availability in trigger varies according to the type of trigger events.
isExecuting: Returns true if the current context for the Apex code is a
trigger, not a Visualforce page, a Web service, or
an executeanonymous() API call.
isInsert: Returns true if this trigger was fired due to an insert operation,
from the Salesforce user interface, Apex, or the API.
isUpdate: Returns true if this trigger was fired due to an update
operation, from the Salesforce user interface, Apex, or the API.
isDelete: Returns true if this trigger was fired due to a delete operation,
from the Salesforce user interface, Apex, or the API.
isBefore: Returns true if this trigger was fired before any record was
saved.
isAfter: Returns true if this trigger was fired after all records were
saved.
isUndelete: Returns true if this trigger was fired after a record is
recovered from the Recycle Bin (that is, after an undelete operation
from the Salesforce user interface, Apex, or the API.)
new: Returns a list of the new versions of the sObject records. This
sObject list is only available in insert, update, and undelete triggers, and
the records can only be modified in before triggers.
newMap: A map of IDs to the new versions of the sObject records. This
map is only available in before update, after insert, after update, and
after undelete triggers.
old : Returns a list of the old versions of the sObject records. This
sObject list is only available in update and delete triggers.
oldMap: A map of IDs to the old versions of the sObject records. This
map is only available in update and delete triggers.
size: The total number of records in a trigger invocation, both old and
new.
Trigger.New variable returns the list of sObject which has invoked the trigger
and Trigger.NewMap returns the map of ID’s with the newly entered records.
NewMap is only available in after insert, before and after the update and
after undelete.
Trigger.New variable returns the list of sObject which has invoked the trigger
and Trigger.old returns a list of the older versions of the records which have
invoked the trigger. Trigger.Old is only available in update and delete events
we can call a callout method in Apex Trigger but the only condition is that it
has to be an asynchronous callout because the trigger flow cannot wait on
the response received by the callout method.
There is a possibility that the result of the trigger can end up calling the
same trigger again and can run in a loop, this is known as a recursive trigger.
To avoid this scenario we should create a static variable and check the value
of this variable before we execute anything in the trigger. For more details
refer to below link:
If we will not follow above point we may hit governor limit when records are
created/updated/deleted in mass using data loader or other tool.
If the request originates other than UI then Salesforce only checks for
Validation of foreign keys.
Aura is the open source technology that powers Lightning Components. The
aura: namespace contains all of the basic building blocks for defining
components and applications.
Lightning Experience is the name for the all new Salesforce desktop app,
with new features, built with a modern user interface and optimized for
speed.
Style guides and modern enterprise UX best practices to build pixel perfect
apps that match the look and feel of the Lightning Experience and
Salesforce1 Mobile app. Click Here for official link.
What happens to my existing Visualforce Pages?
Application events are best used for something that should be handled at
the application level, such as navigating to a specific record. Application
events allow communication between components that are in separate parts
of the application and have no direct containment relationship.
A bundle contains an Aura definition and its related resources. The definition
can be a component, application, event, interface, or a tokens collection.
A bundle doesn’t have a suffix. Definition files can have one of these
suffixes:
We can create a custom Lightning tab that points to our component and
include that tab in our Salesforce1 Mobile navigation.
Yes, we can use multiple libraries in our lightning component like JQuery,
Bootstrap, custom CSS and custom Javascript libraries using static
resource.
FLS and CRUD are not automatically enforced in the lightning component
whenever any object is referenced in the Apex Controller and the component
will display the fields and records for which the users do not have access.
Therefore we should manually enforce the FLS and CRUD in the Apex
Controller. Also when we use Lightning Data service it takes care of FLS and
CRUD for us.
Spinners are CSS loading indicators that should be shown when retrieving
data or performing slow computations. lightning:spinner displays an
animated spinner image to indicate that a request is loading. This
component can be used when retrieving data or performing an operation
that takes time to complete.
or
Use Lightning Data Service to load, create, edit, or delete a record in your
component without requiring Apex code. Lightning Data Service handles
sharing rules and field-level security for you. In addition to not needing Apex,
Lightning Data Service improves performance and user interface
consistency. Main advantage of using lightning data service is that we can
perform basic operations without Apex code.
$globalID
$Browser
$Label
$Locale
$Resource
Modals/Popup Box are used to display content in a layer above the app. This
paradigm is used in cases such as the creation or editing of a record, as well
as various types of messaging and wizards.
For your whole org, you can maintain a list of authorized users, set password
policies, and limit logins to certain hours and locations.
You can restrict access to certain fields, even if a user has access to the
object. For example, you can make the salary field in a position object
invisible to interviewers but visible to hiring managers and recruiters.
You can allow particular users to view an object, but then restrict the
individual object records they’re allowed to see. For example, an interviewer
can see and edit her own reviews, but not the reviews of other interviewers.
You can manage record-level access in these four ways.
Organization-wide defaults
Role hierarchies
Sharing rules
Manual sharing
It gives access for users higher in the hierarchy to all records owned by users
below them in the hierarchy. Role hierarchies don’t have to match your
organization chart exactly. Instead, each role in the hierarchy should
represent a level of data access that a user or group of users needs.
What is Profile
Each user has a single profile that controls which data and features that user
has access to. A profile is a collection of settings and permissions. Profile
settings determine which data the user can see, and permissions determine
what the user can do with that data.
Profiles usually match up with a user’s job function (for example, system
administrator, recruiter, or hiring manager), but you can have profiles for
anything that makes sense for your Salesforce org. A profile can be assigned
to many users, but a user can have only one profile at a time.
Read Only
Standard User
Marketing User
Contract Manager
System Administrator
Permission sets make it easy to grant access to the various apps and custom
objects in your org, and to take away access when it’s no longer needed.
Users can have only one profile, but they can have multiple permission sets.
View all and Modify all permissions are usually given to system administrator.
When you grant “View All” or “Modify All” for an object on a profile or
permission set, you grant any associated users access to all records of that
object regardless of the sharing and security settings.
In essence, the “View All” and “Modify All” permissions ignore the sharing
model, role hierarchy, and sharing rules that the “Create,” “Read,” “Edit,” and
“Delete” permissions respect. Furthermore, “Modify All” also gives a user
the ability to mass transfer, mass update, and mass delete records of that
specific object, and approve such records even if the user is not a
designated approver.
These tasks are typically reserved for administrators, but because “View All”
and “Modify All” let us selectively override the system, responsibilities that
are usually reserved for the administrator can be delegated to other users in
a highly controlled fashion.
No, Permission Set always extends the permission. It does not restrict
permission to users.
If a user does not have access to a specific record type,
will they be able to see the records that have that record
type?
Yes, Record type controls only visibility of record on UI but not its access to
users. If user does not have access to record type then user will not be able
to create records for that record type using UI. But user will we able to see
records if they have appropriate permission to do so.
For more details about salesforce interview questions and answers, please
refer to below posts: