KEMBAR78
Interview QA | PDF | Software As A Service | Cloud Computing
0% found this document useful (0 votes)
409 views112 pages

Interview QA

The document discusses Salesforce platform interview questions and answers related to cloud computing, PaaS, SaaS, IaaS, sandboxes, data modeling concepts like objects, relationships, and fields in Salesforce. It also covers security and access related questions on roles, profiles and field level security.

Uploaded by

amritamca2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
409 views112 pages

Interview QA

The document discusses Salesforce platform interview questions and answers related to cloud computing, PaaS, SaaS, IaaS, sandboxes, data modeling concepts like objects, relationships, and fields in Salesforce. It also covers security and access related questions on roles, profiles and field level security.

Uploaded by

amritamca2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 112

Salesforce Platform Interview Questions and Answers

Let’s start with Salesforce Admin Interview questions with platform questions first.

1. What is cloud Computing?

Cloud computing is a way to access information and applications online instead of


having to build, manage, and maintain them on your own hard drive or servers. It’s
fast, efficient, and secure.

Simply put, cloud computing is a way of accessing services on the internet instead of
on your computer. You can use the cloud to access applications, data, and
development tools from virtually anywhere. Whether you’re working on your phone
from a crowded train in Chicago or on your laptop at a hotel in Hong Kong, you can
access the same information because it all lives online.

2. What is Paas, Saas, Iaas?

IaaS (Infrastructure as a Service) – Here, cloud service providers largely focus on


infrastructure services like hosting, server, storage services, etc.

SaaS (Software-as-a-Service) – SaaS is a software delivery model in which


software is licensed on a subscription basis and hosted centrally.

PaaS (Platform-as-a-Services) – This is a category of cloud computing services


that provide a platform allowing customers to develop, run, and manage apps.

3. What is Sandbox and the Type of Sandbox in Salesforce?

A Salesforce sandbox is an isolated copy of your organization’s production


environment that is used for development and testing purposes. Your production
environment has your live data and active users logging in. A Salesforce sandbox
will always include a copy of your production organization’s metadata.

(A sandbox is a similar copy of a Salesforce production that is used for testing,


development, and training. The content and size of a sandbox may vary depending
on the type of sandbox and the edition of the production organization that is
associated with the sandbox. ) 1 more definition

Types of Sandbox in Salesforce

There are 4 types of Salesforce sandbox environments.

1. Developer Sandbox (200MB storage, refreshes daily, Used for


developing)
2. Developer Pro Sandbox (1GB storage, refreshes daily, Used for
integration testing)
3. Partial Copy/Partial Data Sandbox (5GB storage, refreshes every 5 days,
Used for the end-end test)
4. Full Sandbox (The same size as Production, refreshes in 28 days, Used
for UAT testing)

Salesforce Admin Data Modeling Interview Questions

Let’s start with Salesforce Admin data modeling interview questions. That is
fundamental for any admin.

4. What is Object in Salesforce?

Objects in Salesforce are used as database tables that are used to store information
about an organization. We have two types of objects in salesforce, they are.

1. Standard Object: These are the objects provided by the salesforce, which
include contacts, accounts, opportunities, leads, cases, campaigns, products,
contracts, dashboards, etc.
2. Custom Object: This includes the modifications made to the Salesforce by
users. It stores the essential and unique information of an organization.
Custom Object includes page layouts, relationship to other objects, custom
user interface tab, custom fields, etc.

5. What are the different types of object relations in Salesforce

The different types of object relationships in Salesforce are:

1. Master-Detail Relationship (1:n):- It is a parent-child relationship in which


the master object controls the behavior of the dependent child object. It is a
1:n relationship, in which there can be only one parent, but many children.
1. The master field cannot be empty.
2. If a master record is deleted, the corresponding dependent object
record are also deleted.
3. This is called a cascade delete.
4. Dependent fields will inherit the owner, sharing and security settings
from its master.
5. You can define master-detail relationships between two custom
objects, or between a custom object and standard object as long as the
standard object is the master in the relationship.
2. Lookup Relationship (1:n): Lookup relationships are used when you want to
create a link between two objects, but without the dependency on the parent
object. Similar to Master-Detail relationship, you can think of this as a form of
parent-child relationship where there is only one parent, but many children i.e.
1:n relationship.
1. Deleting a record will not result in automatic deletion Child record.
2. Neither will the child fields inherit the owner, sharing or security
settings of its parent.
3. Junction Relationship (Many-To-Many): This kind of a relationship can exist
when there is a need to create two master-detail relationships. Two master-
detail relationships can be created by linking 3 custom objects. Here, two
objects will be master objects and the third object will be dependent on both
the objects. In simpler words, it will be a child object for both the master
objects.
4. Self Relationship : A Self-Relationship is a lookup relationship to the same
object. It is this premise that allows users to take the object “Merchandise”
and create relationships with other objects.

6. What is a Master–Detail relationship in Salesforce?

 Master-Detail relationship is a relationship between a parent and child where


the master represents the parent and the detail represents a child. This
relationship can be used when we want to control the display of detail records
based on the value present in the master record.
 The master object completely takes control of the behavior of the Detail
object. The survival of the child is dependent on the parent, because if the
parent gets deleted then the child automatically gets deleted. You can create
Roll-up summary fields in master records which will calculate the SUM, AVG,
and MIN of the child records.
 Consider an example of a courier company model, where a delivery schedule
is always linked to a delivery location. If we delete a delivery location from our
list, then all the related delivery schedules should also be removed. Such a
dependency can be achieved only through a Master-Detail relationship

7. What is a junction object in Salesforce?

Junction objects are useful in building many-to-many relationships between objects


in Salesforce. Take an example of recruiting application, where a position for a job is
linked to many candidates or a candidate can apply for many other jobs. Here object
“job application” is referred to as a junction object in order to connect the data model.
In this example, “job application” is the junction object.

8. How many LR(lookup relationship) fields can be created in an object?

Maximum 40 Lookup relationship fields can be created in an object.

9. What is a Roll-up Summary field

A roll-up summary field calculates values from related records, such as those in
a related list. You can create a roll-up summary field to display a value in a master
record based on the values of fields in a detail record. The detail record must be
related to the master through a master-detail relationship.

10. How many way to create What is a Roll-up Summary field

If the default Max Roll-Up Summary Field limit per object increased from 10 to 25
in the Winter ’16 release. Hard-coded limit for roll-up summary fields is 40 per object

11. What is field dependency?

Field dependencies in salesforce used to control the visibility of picklist values on


one object based on another object. The object which controls the visibility of other
objects we called as controlling object and object which get controlled called as
Dependent object.

Can we define as Can we define as


Data Type
Controlling field Dependent field

Standard Picklist Yes No

Custom Picklist Yes Yes

Multi-Select pick list No Yes

Checkbox Yes No

Salesforce Admin Security and Access Interview Questions

12. What is the difference between role and profile

Role Profile

The role helps in defining data visibility A profile sets the limitation for what an user can
for a particular user. do in the organization.

Based on the hierarchy, a role defines


Profile defines permissions
which user data a user can see.

Defining role to a user is not mandatory Defining profile is mandatory

Roles provide a feature to control access Profiles help to decide record privileges i.e.
to records by impacting reports. For assuming the user can observe the record, it
example,“My Teams” filter. Roles concludes what the user can function, edit,
function if a security model (OWDs) of an delete, view on that record. It controls other
Role Profile

system privileges like export data, mass email,


organization is set to private.
etc.
The main difference between role and profile is given below –

Role:A role helps manage and regulate the Salesforce access that affects reports.
Also, it allows for controlling user visibility over data within an organization. Users
who can access the data and perform operations on it are given a specific role.
Candidates with a specific role can share the reports with other team members.

Profile:A profile is an essential component of any organization. Moreover, it is


compulsory for all users to verify their identity for legal authorization. It helps secure
an organization’s data from illegal visitors. It is not permissible to operate Salesforce
without having a profile. It also controls the types of records that a user can see.

13. What are Permission sets?

A Permission Set is a collection of settings or permissions that is used to give access


to numerous tools and functions for the user. You can use permission sets for
different types of users to extend functional access without changing their profiles.
Instead of creating a separate profile each time, you could easily create a
Permission Set.

What is the difference between permission sets and sharing rules?

Answer: A Permission Set is a collection of settings and permissions that give users
access to various tools and functions. Permission sets extend users’ functional
access without changing their profiles.

Sharing rules are used to extend sharing access to users in public groups, roles, or
territories. Sharing rules give particular users greater access by making automatic
exceptions to your org-wide sharing settings.
14. What is use of muting permission set in permission set group

By Adding Muting Permission in permission set group we can switch off/turn


off/remove particular permission/Setting within a group without affecting the rest of
the permission sets within the group

15. How many ways we can share a record?

With the help of the given below methods we can share records in Salesforce:

Role hierarchy:

 Whenever a user is added to a role, the user above the current user in the
hierarchy of roles will have access to reading the records and inheriting the
permissions.
 Follow the steps for role hierarchy: Go to Setup → find manage users’ →
roles → set up roles → click on ‘add role’ → provide name and click on save.

OWD:

 OWD(Organization-Wide Defaults) allows you to give permissions to the


organization-wide and to define baseline setting for the organization. It is also
helpful in defining the user’s accessibility level to the user where a user can
see other user’s records.
 OWD settings can be Public Read Only, Private, Public Read, and Write.
 Follow the steps for OWD: Go to Setup → find the Security Controls → click
on ‘sharing settings’ → click on ‘Edit.

Manual sharing:

 Manual sharing is sharing a single record/file to a single user or group of


users through manual access.
 We can see a button for manual sharing on the detail page of the record and it
can be seen only when the OWD setting is private.

Criteria based sharing rules:

 If we want to share records based on conditions such as share records with a


group of users with the criteria of the country is India.
 Follow the steps for criteria-based sharing rules: Go to Setup → security
controls → sharing settings → select the object and provide name and
conditions then click on save.

Apex sharing:

 Sharing object is available for each and every object in Salesforce. For
example, the Account object’s share object is AccountShare.
 By using Apex, if we want to share the records then we have to create a
record to the shared object.
16. What are Audit Fields in Salesforce?

Audit Fields in Salesforce are special fields that track information about your
records that can be valuable for audit purposes. Typically these fields include:
CreatedByID. CreatedDate

17. What is an Audit trail?

The Audit trail in Salesforce is a unique feature that helps in tracking the changes
that have been made in the organization by you and other administrators. It would be
helpful for the organization with more administrators. This audit trail shows you the
information of the twenty most recently made changes in your organization.

18. What is a Queue in Salesforce?

Prioritize and assign records to teams that share workloads. There’s no limit to the
number of queues you can create, and you can choose when queue members
receive email notifications.

19. What is a Public Group

Groups are sets of users. They can contain individual users, other groups, the users
in a particular role or territory, and/or the users in a particular role or territory plus all
of the users below that role or territory in the hierarchy.

Report and Dashboard Interview Question and Answers

20. Difference between static and dynamic dashboards in Salesforce?

Static dashboards Dynamic dashboards

These are the default


dashboards that are visible Dynamic dashboards show data tailored for a specific user
to any user

It is used to show
It is used to show a single user’s specific data, such as the
organizational-wide data to
number of sales closed, leads converted, etc
a set of users
Static dashboards Dynamic dashboards

It can be scheduled to We can’t schedule dynamic dashboard because when the


automatically refresh its dashboard is opened by us, it will display the real-time
data generated data

21. What are the different types of reports available in Salesforce?

Reports will give a clear picture to the management. Management will make use of
reports to track progress towards its various goals, increase revenue, and control
expenditure. Reports will also help to predict trends and thus gives the advantage of
the increase in profits.

There are four types of reports in Salesforce. They are as follows:

 Matrix report
o A report is formed by grouping the records by rows as well as columns.
It is used when you want to see data by two separate dimensions that
aren’t related, such as date and product.
o Example: Summarize opportunities by account horizontally and by
month vertically.
 Summary report
o A report that provides a listing of data with groupings and subtotals. It
is used when subtotals are needed, based on the value of a particular
field, or when you want to create a hierarchically grouped report.
o Example: All opportunities for your team subtotaled by owner and sales
stage.
 Tabular report
o A report that provides details of a company in tabular format. It is used
when you want a simple list or an item list with a grand total.
o Example: These reports are used to list all accounts, list of
opportunities, list of contacts, etc.
 Joined report
o A report that is created by the mixture of any combination of reports.
Like matrix report plus summary report can give you a joined report.
Also, matrix reports and tabular reports can give a joined report.
o Example: You can develop a report to display opportunity, case, and
activity data for your accounts.

22. What is Report Type?

The report type is simply a template in Salesforce which is built based on objects
and relationships in between objects and fields. Every report in Salesforce can be
created only based on the report type.

23. What are WhoId and WhatId in activities?

WhoID refers to people. Typically: contacts or leads. Example: LeadID, ContactID


WhatID refers to objects. Example: AccountID, OpportunityID

24. What is a bucket field in reports?

A bucket field lets you group related records together by ranges and segments,
without the use of complex formulas and custom fields. Bucketing can thus be used
to group, filter, or arrange report data. When you create a bucket field, you need to
define multiple categories (buckets) that are used to group report values. The
advantage is that earlier, we had to create custom fields to group or segment certain
data.

Data Management Interview Question and Answers

25. Way to clean data in Salesforce

Validation – Using Validation in Salesforce is a great way to keep data clean. This
can come in a few different forms such as required fields, using picklists over free
text fields, validation rules, as well as setting correct permissions. All of the
mentioned features are simply trying to ensure that users can only enter data
they should be entering. This is one of the most effective prevention methods for bad
data.

Duplicate Management – A common issue for users and admins using Salesforce,
is duplicates. They can come from various sources including an initial data load,
marketing leads (events/website), or users themselves manually entering them.
Salesforce has various simple but powerful duplicate tools to prevent this.

Deduplication Tools – If bad data has become such a problem and is beyond
repair, luckily there are AppExchange Apps that can help.

Data Import Wizard Data Loader

For simple imports of data For complex imports of data

It can load up to 50,000 records. It can load up to 5,00,000 records.

It supports all the custom objects and


only a few standard objects like
Account, Contact, Campaign It supports all custom and standard objects.
members, person accounts, Leads,
and Solution.

It supports schedule export. It doesn’t support scheduled export.

Delete operation is not available. Delete operation is available.

Cannot import cases and opportunity. Can import cases, events, tasks, and opportunities

While importing, duplicates can be


While importing, duplicates cannot be ignored.
ignored.
It doesn’t require installation. It requires installation.

26. Differences between Import wizard and Data loader.

27. What is “Data Skew” in Salesforce

In Salesforce, Data skew is a condition which you will occur when working for a big
organization when there are more than 10,000 records. So, when users perform
updates performance issue will be encountered. It happens because of data skew.

28. What is cascade deletion?

Cascade deletion happens when the relationship is master-detail. If parent get


deleted then automatically child’s records also get deletes

Automation Interview Question and Answers

29. What is a Flow?

Flow is an automation tool provided by Salesforce which can be used to perform


various tasks like, Sending an Email, Posting a chatter, Sending the custom
Notifications & etc using clicks instead of code. Flow can be trigger for record insert,
update and record delete and it can be run for both after and before events. As an
admin, Flows are going to be your best friend because you will be able to handle the
majority of complex business requirements without the help of a Salesforce
developer

30. Types of flows in Salesforce

Screen Flow: With Screen Flow you can create a custom UI (user interface) and
guide users through a business process that can be launched from Lightning Pages,
Experience Cloud (previously known as Community Cloud), quick actions and more.
Record-Triggered Flow: This Flow launches when is record is created, updated, or
deleted. So far, we have used Apex triggers for these automations some of which
can now be done using Flows.

Scheduled-Triggered Flow: This flow launches at the specified time and frequency
for each record in a batch. Traditionally we have met this kind of requirement using
Apex batch jobs.

Platform Event Flow: Launches when a platform event message is received. For
example, you can pump the data from external system in Platform Events and then
use Flows to split and save the records in different objects.

Auto launched Flow: Launches when invoked by Apex, Process Builder or even
REST API.

Salesforce Admin Scenario Based Interview Questions

31. Name a few global variables which are used in formula and validation rules.

Ans: $User, $Organization, $Setup, $Objecttype, $Action etc.

32. Is there any special permission available to edit read only fields. Please
explain.

Ans: Yes. There is a system permission named ‘Edit Read Only Fields’ which allows
to edit read only field values. For System Administrator profile, this is enabled by
default.

33. What are the differences between Object-specific action and global
actions?

 a) Both types can create records, but only object-specific actions can update
records.
 b) Object-specific create actions create records that are automatically
associated with the current record. A record created by a global create action
has no relationship with other records.

34. Mention one impact point to check before deleting a role from the org.

Ans: Before deleting a role, we should check whether the role has been used in any
sharing rule. If the role is deleted, the sharing rule is also deleted.

35. Let’s say I create two accounts a1 and a2. Now I make a2 as the parent of
a1. Now what will happen if I try to make a1 parent of a2.

Ans: The error ‘A parent account can’t be the child of an account it’s already a
parent of’ will be shown.
36. How do you pass the current record id to a screen flow? Also is it possible
to send the entire record?

Ans: In order to pass current record Id, we need to declare a variable of name
‘recordId’ of type text and select the option ‘Available for Input’. To pass the entire
record, we can create a variable of name ‘recordId’ of type Record and select the
object type as that particular SObject.

37. How do you check your org is in which release.

Ans: From Setup, go to Company Information and copy the instance Id. Now go to
status.salesforce.com and search with the same instance id to get the details.

38. What is a big object? Give an example of a standard big object.

Ans: A big object can store massive amount of data from other object and even from
external objects. Clients and external systems use a standard set of APIs to access
big object data. A big object provides consistent performance, whether you have 1
million records, 100 million, or even 1 billion.

Example of standard big object is FieldHistoryArchive.

39. Is it possible to use formula field in roll up summary calculation which is


referring to another object?

Ans: No. In order to get the value from the formula field, we need to create some
automation to copy the data to a new field and use that field in the roll up summary
calculation.

40. Suppose there is a custom field which has a default value but not added to
the page layout. Now, if you clone a record from the UI, what would be the
value of the field in the new record?

Ans: The value would be the default value set at the field level, not the value which
was populated in the previous record.

41. What is the consideration while deleting an approval process?

Ans: Approval processes can be deactivated and deleted. If there are already
records in pending status, an approval process can be deactivated but not deleted.
In order to delete an approval process, we need to ensure there are no records in
the org which is locked in the approval process else an error will be encountered.

42. What happens during Lead merging?

Ans: We can select up to 3 leads during merging. Those are identified as duplicates
based on the duplicate rule condition on the org. One of the lead is considered as a
Master record and the read only and hidden field values are retained from that lead.
Once it is merged, the resultant record is a single lead record and the other two
records are deleted.
43. What is Apex Hammer?

Ans: Before each major service upgrade, Salesforce runs all Apex tests on your
behalf through a process called Apex Hammer. This is run across all the orgs.

44. How do you convert 15 digit record Id to 18 digit Id in formula and


validation rule?

Ans: Using CASESAFEID() function.

45. Is it possible to hard delete records using data loader?

Ans: Yes. We need to enable a system permission ‘Bulk API Hard Delete’ for the
user in order to do hard delete. Also, we need to select the Bulk API option in the
data loader before the deletion.

46. Is it possible to show validation errors in screen flow?

Ans: Yes. We can show validation error message in screen flow for certain
components using the Validate Input option. In this option, the condition which is
provided must be false for the validation rule to fire which is in contrast with the
standard/contrast validation rules.

47. You have created a custom object. While creating a report on the object,
you are not getting the option to select the object in the report builder. What
could be the issue?

Ans: Check if the Allow Reports checkbox is enabled in the object detail page.

48. What are the possible statuses of a permission set group?

Ans:

Updated. The group is current.

Outdated. The group requires recalculation.

Updating. The group is in recalculation mode.

Failed. The group recalculation failed.

49. How can we enable email approval response? Mention a few response
keywords which will approve/reject the request.

Ans: From Setup -> Process Automation Settings, we can enable the settings.
Approve, Yes, Reject, No etc. are few of the responses.

50. You are not getting an option to create list custom settings. Which setting
needs to be enabled?
Ans: From Setup -> Schema Settings -> Enable Manage list custom settings type.

51. Once a lead is converted it is not visible anymore in the UI. Is there any
permission available to view converted leads?

Ans: Yes. There is app permission, View and Edit Converted Leads.

52. You are trying to convert a master detail relationship field to lookup
relationship. But you are not able to see the change field type button. What
could be the reason?

Ans: Check there should be no roll up summary field present in the parent object.
Also, if there is any deleted roll up field present in recycle bin that needs to be
erased as well.

53. One of the users in your org is not able to create campaigns. You checked
the profile/ permission sets and ensured that he has access to create
campaigns. What could be the reason?

Ans: Check if the Marketing User checkbox is selected in the user detail page of the
user.

54. What happens when you try to delete a public group?

Ans: If the public group has been used in any sharing rule and associated with any
records in the context of sharing, the associated records appear. Now, an option is
given to delete the public group as well as the sharing of all the records.

55. What happens when you try to delete a queue?

Ans: If the queue is associated with any records or sharing rules, the references are
displayed. The queue cannot be deleted unless the references are removed.

Salesforce Interview Questions and Answers For Freshers

1. What does Salesforce do?

Salesforce provides CRM software and cloud-based solutions that help enterprises
to connect better with their customers. It supports businesses to manage their
customer's data and track their activities efficiently.

2. What are the Salesforce subsidiaries?

The following are the major subsidiaries of Salesforce:

 Tableau
 Pardot
 Heroku
 Mulesoft
 Demandware Inc
 SalesforceIQ

3. What is meant by an Object in Salesforce?

Objects in Salesforce are used as database tables that are used to store information
of an organization. We have two types of objects in salesforce, they are.

Standard Object: These are the objects provided by the salesforce, which include
contacts, accounts, opportunities, leads, cases, campaigns, products, contracts,
dashboards, etc.

Custom Object: This includes the modifications made to Salesforce by users. It


stores the essential and unique information of an organization. Custom Object
includes page layouts, relationship to other objects, custom user interface tab,
custom fields, etc.

4. What is meant by App in Salesforce?

An App in Salesforce.com is a container that holds various things such as a logo,


name, and a set of required tabs. It is also called a group of tabs that work together
to prove the functionality that you are looking for.

In Salesforce, you can customize apps to match your requirements, or you can build
new applications by combining custom and standard tabs.

The process to create an app in Salesforce:

Setup ---> build---> Create---> App---> Click on new.

By following this procedure, you can build an application. However, you want.

5. What type of apps we can create in SF?

We can create two types of Apps in Salesforce

Custom app: This type of apps can be used in every business scenario. It is widely
used in the market.

Console app: This type of app can be used only in the client service business,
where we focus on solving the client’s issues. It is not comparatively, widely used in
the market.

6. What is Salesforce Standard Fields?

Below mentioned are the Salesforce Standard Fields

 Owner,
 Name,
 Last modified by,
 Created by.
7. What are Audit Fields?

Standard fields are nothing but audit fields.

8. Which is the latest field you have worked in SF?

‘Time’ is the latest field in Salesforce.

9. What are the default filters in salesforce?

They are “Date filters.”

10. How to get rid of Date Filter?

By selecting the “All Time” in the “Range” on the page.

11. What are the issues you faced on joined reports?

We can not export.

12. What are the types of reports that we have in Salesforce?

There are four types of reports that are available in Salesforce, which are as follows.

 The tabular report is those that give us the total in a tabular format.
 Matrix reports the format where grouping is done based on columns and
rows.
 The summary report gives us detailed reports based on columns.
 Joined reports which are capable of allowing two or more reports in one
report.

13. What is an Audit trail?

The Audit trail in Salesforce is a unique feature that helps in tracking the changes
that have been made in the organization by you and other administrators. It would be
helpful for the organization with more administrators. This audit trail shows you the
information of the twenty most recently made changes in your organization.

Below are the things that you could come to know:

 The date and time.


 Username of who made the changes.
 What the change was.

14. What are the benefits of using Salesforce CRM?

We get the following benefits by using Salesforce CRM.

 Improved organizational understanding.


 Enhanced communication.
 We can understand the customer better and can facilitate better services.
 Salesforce automates repeated rule-based tasks.
 Improved analytics and dashboards to analyze the data.
 Reduction in cost and cycle time.
 Improves the efficiency of teams.

15. What is a profile? Can two users have the same profile?

The profile is defined as a collection of rules and procedures a person needs to


follow to access particular records. There are multiple profiles available in
Salesforce. For example, a sales profile can have access to leads, opportunities,
contacts, campaigns, etc.

As far as the second question is considered, the answer would be yes. The people
who work in one department have the same profile. So the people who work under a
particular department would be assigned with the same profiles.

As we have seen in the sales profile, many people work under it and every person
who works under is assigned the same profile. Hence any number of people can
have the same profile.

16. Explain the difference between role and profile?

Role: In Salesforce Role is meant to increase the data visibility to a particular user. It
can be done by sharing rules or by building a role hierarchy. Using roles, you can
control the ac

Profile: Unlike the roles profile is mandatory for all, and it stays at the object level. It
is treated as a building pillar of an organization.

17. How many relationships do we have in Salesforce?

We have three types of relationships in Salesforce, which are:

 Master-detail relationship
 Lookup relationship
 External Lookup

18. What is the Master-Detail relationship?

This Master-Detail relationship is the same as the relationship between a parent &
child. In this aspect, the master is treated as Parent, and the Detail is a child. The
master Object takes control of the behavior of the Detail object. The survival of the
child is dependent on the parent because if the Master gets deleted the Detail will
also automatically get deleted. You can create Roll-up summary fields in master
records which helps in calculating the Min, Avg, Sum of the child records.

19. What is a “Lookup Relationship”?

The relationship between the two objects is called a lookup relationship. Lookup
relationships connect two object links together so that you can look up from related
items to other items. It can be one-to-one or one to many.
20. What is an External lookup?

The external lookup relationship is used to connect the child object to the parent
object. The child object may be either a custom, standard, or external object. It uses
to identify the correct map of the child object with the parent external object.
The external lookup relationship values fields are matched against the External Id
values.

21. What is a self-relationship?

It is a personal look up to the same object. The self-relationship creates a tree


diagram of the objects. Let's take an example as an object “merchandise”. In this,
we can create relationship merchandise between two accounts. This is called a self-
relationship.

22. What is the workflow in Salesforce?

Workflow is an excellent way to automate specific business processes in


Salesforce. To do this, you are required to define certain rules and regulations to
automate tasks such as sending an email, updating a field, create a task

 We can have access to workflow across the object.


 It is not possible to query from the database.

23. What is meant by “Transfer record” in profile?

Transfer record is a type of function used to grant permission. If a user has


permission to share a record with others, then he can share the records that have
read-only access.

24. Explain the Salesforce dashboard?

In Salesforce we use dashboards to represent the data in a pictorial format.


Salesforce dashboard is capable of displaying 20 reports at a time.

25. What is SOAP?

A protocol that defines a uniform way of passing XML-encoded data. SOAP Stands
for Simple Object Access Protocol.

26. What is a Time Trigger?

The computer system executes one or more tasks according to the set of rules and
scheduled tasks.

27. What is Trigger in Salesforce?

The trigger is defined as an Apex code that executes before or after the following
functions such as insert, update, delete, etc. trigger enables to perform custom
actions before and after modifications to the records of Salesforce.
28. What are the actions in the workflow?

Below mentioned are the actions in the workflow

 Field update
 Task
 Outbound message
 Email alert

29. What are the main things that need to consider in the “Master-Detail
Relationship”?

Record level access is determined by the parent, Mandatory on the child for
reference of the parent, cascade delete (if you delete the parent, it can cascade
delete the child).

Salesforce Intermediate Interview Questions

30. How many records can be shown in matrix, tabular & summary reports?

We can create up to 2k records in Matrix, Tabular & Summary Reports.

31. Is the Roll-Up Summary field is only possible in the Master-detail relationship?

Yes, it is possible in a master-detail relationship.

32. How many Master-detail relationship fields can be created in an object?

Maximum two MDR fields can be created in an object.

33. How many LR(lookup relationship) fields can be created in an object?

Maximum 40 Lookup relationship fields can be created in an object.

34. If we delete parent records in MDR, what happens to the child?

If you delete the parent record in the MDR, the child record also gets deleted in
MDR.

35. What about the undelete option?

It will restore the record with the data in the object.

36. How many Roll-Up Summary fields can be created in an Object?

Up to 40 can be created. (before 2010 it is 10 after 2016 it is up to 40 and it will


change accordingly to salesforce updates).

37. If we reparent in the object will the parent update?

Yes, the parent will update the object.


38. How we can create an MDR on those objects where we already have records?

1. First, we create LR between the two objects.


2. Connect all child records to parents.
3. Convert the field type from LR to MDR.

39. How to look at the user license information in Salesforce Org?

Steps to find out the user license:

Salesforce Org → Setup → Administer → Company Profile → Company Information.

40. Can we delete a user in Salesforce?

No, we cannot delete the user in the salesforce.

41. Can we change the license when we create a profile?

No, we cannot change the license when we are creating the profile.

42. Explain about object relationship overview?

It creates a link between the custom object and the standard object recorded in a
related list. This is helpful to find the product's defects.

43. How to create many to many relationships in Salesforce?

It helps in creating a many-to-many relationship between two objects in Salesforce.


Using many-to-many relationships you can connect each record of an object to be
linked with multiple records of other objects and vice versa. The junction object helps
us in connecting the two selected objects with each other.

44. What are the permission sets?

A Permission set is a collection of settings or permissions and is used to extend the


user functional access without changing actual profiles. You can use permission sets
to various types of users to extend the functionality access regardless of their roles.
It is time taking task to create a profile; instead of this, you could easily create a
permission set.

45. What is sharing rule?

If we want to give access to other users we use sharing rules.

46. What are the default indexed fields in Salesforce?

We have some fields which are indexed by default in Salesforce, which are :

 Name
 ID
 Owner fields
 Master-detail relationship fields
 Lookup fields
 Last modified dates
 Audit dates

47. What is the Fiscal year in Salesforce?

The Fiscal year is known as the starting and ending date of a company's financial
year. We have two types of financial years in Salesforce which are as follows.

1. Standard fiscal year


2. Custom fiscal year
48. List some examples of custom fields?

There are many custom fields available are Picklist, Currency, Date, Text, Picklist
(multi-select), Email, Percent, Number, Phone, Text area, Lookup relationship,
Geolocation, Checkbox, Master-Detail relationship, etc..

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

We have five different ways in Salesforce to store various types of records such as
images, files, and documents.

They are

 Attachments
 Google drive
 Chatter Files
 Libraries
 Attachments.

50. What is the main difference between data table vs page block table tags?

The differences between the Data table and Page block

Page block:

 It defines inside the page block station or page block


 To design the visual pages uses style sheets
 The required attribute is “value”
 Automatically it will display Column Headers

DataTable:

 No need to mention inside the page block station or page block


 No required value.
 The data will be displayed using custom style sheets.
 we need to specify column headers explicitly.

51. What can cause data loss in Salesforce?

There are many things that can contribute to data loss in Salesforce. Which
includes :

1. Migrating to number, percent, and money, from other data types.


2. When you change the date and time
3. Migrating to multi-select picklist from any other type but except picklist.
4. Moving from Checkbox, auto number,multi-select picklist to any other types.
5. Changing text area to phone, URL, email, or text.

52. What is the junction object and what is it used for?

Junction objects are mainly used to create a many-to-many relationship in


Salesforce. If you consider a recruiting application as an example, you can find a
position that is linked to many candidates, and in the same fashion, a candidate can
apply for many positions.

53. How does Salesforce track sales details?

Salesforce gives the accurate results of following things such as

 Number of customers served on a daily basis


 Regular sales numbers
 Complete reports from the Sales Manager.
 Generates sales reports on a timely basis
 It provides the details of repeat customer activity.

54. Is it possible to restrict access to data using sharing rules?

The sharing rules are used only for allowing greater access to records not for
restricting.

55. Can we schedule a dynamic dashboard in Salesforce?

No, we can not do that in Salesforce.

56. How many ways we can share a record?

Role Hierarchy :
If we add a user to a role, the user who is above in the role hierarchy will have read
access.

Setup → manage users → roles → setup roles → click on ‘add role’ → provide name
and save.

OWD:

 Defines the baseline setting for the organization.


 Defines the level of access to the user can see the other user’s record

OWD can be Private, Public Read Only, Public Read and Write.

Setup → Security Controls → sharing settings → Click on ‘Edit’

Manual Sharing :

Manual Sharing is sharing a single record to a single user or group of users.

We can see this button detail page of the record and this is visible only when the
OWD setting is private.

57. What is the difference between insert() and database .insert()?

Using the insert method we can insert the records but if any error occurs in any
record system will throw an error insertion fail and none of the records are inserted. If
we want to execute partially the success of bulk insert operation we will use
database .insert.

58. Does the user can create insert their own custom logo while creating their own
custom applications?

Yes, users can upload their custom logo in documents, and then they choose that
logo for the organization.

59. List things that can be customized on-page?

We can customize different things on page layouts like Fields, Buttons, Custom
Links, and Related Lists. We can also create sections.

60. Can we create a Roll-Up Summary(RUS) field on the master object?

Yes. we can create a Roll-Up Summary field on the master object.

61. Can the governor limit perform partial DML activity? Eg: we are inserting 200
records in a loop, the Governor limit is hit at the 151st record, then will those 150
records be created?

No either all or none.

Salesforce Apex Beginner Interview Questions


62. What is Apex Interface?

The interface is a collection of unimplemented methods. This will specify the


signature of the method, types of inputs that we pass the method specify what type
is given as an output.

Note: Generally the interface methods we give it as global.

63. Where can I use Apex?

We can use Apex in the following ways

 To create Email services


 Create web services
 Perform complex validation over multiple objects
 To create complex business processes that are not supported by a workflow.
 Create custom transaction logic
 Attach custom logic to another operation

64. How Does Apex Work?

All Apex programs run entirely On-Demand on the Force.com Platform.

 First, the platform application server compiles the code into an abstract set of
instructions that can be understood by the Apex runtime interpreters.
 The compiled code is stored in metadata.

When the end-users trigger the execution of Apex by clicking a button or the
VisualForce page the application servers retrieve the compiled instructions from the
metadata and send them to the runtime interpreter before returning the result.

65. What is Apex in Salesforce?

Apex is a strongly typed object-oriented programming language.

It allows the developer to execute flows and transaction control statements.

Apex enables developers to add business logic to most system events like button
clicks related to record updates and VisualForce pages.

66. What are the ways to call the Apex class?

Below mentioned are the ways in Salesforce to call Apex class.

 From another class


 From developer console
 From JavaScript links
 From home page components
 By using trigger
 From VisualForce page
67. Explain various methods of batch Apex class?

The batch apex class deploys the database batchable interface with the three
methods as follows:

 Start
 Finish
 Execute

Start: We use the start method at the beginning of the batch apex job. We use it for
collecting the objects or records, for passing them to the interface for executing. It
returns a DatabaseQueryLocator object that comprises objects or the records sent to
the job.

Finish: We call this method once we finish the batch processing. We use this
method to send confirmation emails or to execute the post-processing operations.

Execute: We use this method for every batch of the records that are sent to the
method. We use this method for data processing. This method does the following:

 sObjects records list


 Reference to the DatabaseBatcheable context.

68. What is Apex Email Service?

Email services are an automated process that uses Apex classes to process the
contents, Headers, Attachments of Inbound Email.

Note:

 Visualforce email templates cannot be used for mass emails.


 We can associate each email service with one or more salesforce-generated
email addresses to which the users can send messages for processing.

69. Explain Apex Programming Language?

 Integrated: It provides built-in support for DML Calls


 Inline Salesforce Object Query Language
 Easy to Use
 Easy to Test
 Version
 Multi-Tenant Aware Application

70. What is Map Class in Apex Salesforce?

Map Class in Apex:

 Map Class Contains methods for the Map collection type.


 A Map is a collection of key-value pairs where each unique keymap to a
single value.
 Map keys and values can be any data type primitive types, collections,
objects, user-defined types, and built-in Apex types.

‘United
Country(Key) ‘Japan’ France’ ‘England’ ‘India’
States

Currency (Value) ‘Dollar’ Yen’ ‘Euro’ ‘Pound’ ‘Rupee’

For Example, the following table represents a map of countries and currencies

71. What is Batch Apex in Salesforce?

Batch Apex: Batch Apex allows you to define a single job that can be broken up into
manageable chunks, whereas every chunk can be processed separately.

In the Batch Apex it will fetch all the records on which you want to perform the field
update and divide them into a list of 200 records and on every 200 records operation
is performed separately.

This would help us to execute on more than 10,000 records as it won’t perform an
operation on all the records in a single transaction instead it divides them into a
number of subtasks where each subtask may contain records up to 4000.

Example:

If you need to make a field update of every record of account object in your
organization, then we have governing limits that would restrict us from achieving the
above task.

Reason: In a single transaction we can process only 10,000 records. Now in the
above case if we have more than 10,000 records in the organization then we can not
perform this field update.

Salesforce Apex Intermediate Interview Questions

72. What is Apex Scheduler?

It will invoke the Apex classes to run at a specific time.

Anybody who wants to schedule their class they have to implement the schedulable
interface.

Schedule Interface: The class that implements this interface can be scheduled to
run at different intervals. This interface has several methods that are
Public void execute(schedulablecontext sc)
Public class mySchedule implements schedulable
{
Public void execute(schedulablecontext sc)
{
Account a = new Account(Name = ‘Faraz’)
Insert a;
}
}

73. What is the Apex Trigger in Salesforce?

The trigger is an Apex Code that executes before or after. The following types of
DML Operations:

 Insert
 Update
 Delete
 Merge
 Upsert
 Undelete

74. What is meant by Apex transaction?

An Apex transaction represents a group of operations that are needed to be


executed at once. It includes the Data Manipulation Language (DML) and is
responsible for querying records. The DML operations in a transaction either
success or if anything goes wrong or occurs even with a single record could result in
a rollback of the entire transaction.

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

Triggers are divided into 2 types

1. Before Triggers
2. After Triggers

Before Triggers: Before Triggers can be used to update or validate values of a


record before they are saved to the database.

After Triggers: After Triggers Before Triggers can be 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.

76. What is Apex Managed Sharing?


Apex Managed Sharing provides developers with the ability to support an application
to share requirements.

 This type of sharing is available only with users to modify all data permissions.
Only these users can add/change apex-managed sharing.
 Apex Managed Sharing uses a Sharing reason (Apex Sharing Reason)

77. What is the Usage of the apex program within the VisualForce page?

When you want to call the apex class on the VisualForce page we have to declare in
the following format.

< Apex : page controller = “class name “ >

Whenever we call a VisualForce page in which the controller attribute is defined it


will first create an object for the apex class which is defined in the controller. When
an object is created for the apex class first it involves the constructor.

78. What is Sandbox in Salesforce?

A Sandbox is defined as a testing environment that is used to test the code or to


conduct experiments in an isolated environment without harming the production
environment.

79. When do we use Sandbox?

A Sandbox helps you when you want to test the newly developed application on
force.com or VisualForce page. It is not possible to check something in the
production environment if do, so it creates a problem for the regular functioning. So,
to get out of this problem developers use Sandbox to test the application.

Types of sandboxes available are :

 Developer
 Developer pro
 Partial copy
 Full

Salesforce Apex Advanced Interview Questions

80. What is Multitenant Architecture in Salesforce?

It is the cloud's fundamental technology to share IT resources securely and cost-


efficiently.

81. What are static resources?

Ans: Static resources allow you to add the content that you want to reference it on
the VisualForce page, which includes things like images, Javascript, archives, CSS
files, etc. The maximum size of a static resource of an organization is 250 MB.

82. List the data types that a Set can store

The Sets can store any of the following data types

 Collections
 User-defined types
 subjects
 Primitive types
 Built-in Apex types

83. What is a Visualforce component?

Visualforce components are small reusable components of functionality such as


widgets, user interface elements, panels, etc. We have two types of VisualForce
components which are standard and custom and are used to define the user
interface behavior.

84. What is SOQL?

A query language that allows you to construct simple but powerful query strings and
to specify the criteria that should be used to select the data from the platform
database. SOQL Stands for Salesforce Object Query Language.

85. What is the Bulkification best practice?

We must avoid using index values like Trigger.New[0] as we never know how many
records we get in Trigger.New at runtime.

1. We need to use it for each loop whether we have 1 record or many.


2. We must not use SOQL inside for loop.
3. We must not use SOSL inside for loop.
4. We must not use DML inside for loop.
5. We need to store data in collections, so our code will work for single as well
as multiple records.

Salesforce Apex Technical Interview Questions

86. database.insert(ListForBulkDML, True) means what?

Insert ListForBulkDML;

87. How can we perform DML partially?

If we want partially to happen, use a database.insert(list, false);

88. What Are The Types of SOQL Statements in SalesForce?

Salesforce Object Query Language is used to query records from the database.com
based on the requirement.

There are 2 types of SOQL Statements:

1. Static SOQL
2. Dynamic SOQL

Static SOQL:

The Static SOQL Statement is written in [] (Array Brackets)

These statements are similar to IINQ (Ion Integrated Query)

Example:

String search for =’Jones’;


Contact[] contacts=[select testfield__c, FirstName, LastName from Contact Where
Last Name=:search for];

Dynamic SOQL:

It is used to refer to the creation of a SOQL string at run time with Apex code.

 Dynamic SOQL enables you to create a more flexible application.


 To create a Dynamic SOQL query at run time use a Database.Query()
method, in one of the following ways.
 Return a single sObjects when the query returns a single record.
 sObjects s = Database. Query(String_limit_l);
 Return a list of sObjects when the query returns more than a single record.

Example 1:- Queries

String myTestString = ‘TestName’;


List List= Database.Query(SELECT Id FROM MyCustomObject__c WHERE Name =
:myTestString);

Example 2:- Queries

String resolvedfield L = myvariable.field__c;


List L = Database.Query(‘SELECT Id FROM myCustomObject__c WHERE field__c
= ‘+resolvedfield_L);

89. What is the Syntax of SOQL Statement?

Syntax -

SELECT field1, field2,.... FROM Object_Type [WHERE condition]

Example:-Queries

List accountList = [SELECT ID, Name, FROM Account];


List accountList = [SELECT ID, Name, FROM Account WHERE annual
revenue<10000];

90. Explain briefly about GROUP BY with the syntax?

With API version 18.0 and later/you can use group by with aggregate functions,
such as sum() or max() to summarize the data and enable you to rollup query results
rather than having to process the individual records in your code.

Syntax: [ GROUP BY field GROUP BY LIST]

91. SOSL Statements In Salesforce Apex?

SOSL statement evaluates the list of sObjects, where each list contains the search
results for a particular sobject type, The result lists are always returned in the same
order as they were specified in the query.

If a SOSL query does not return any records for a specified sObject type, the search
results include an empty list for that sObject.

Example: You can return a list of accounts, contacts, opportunities, and leads that
begin with the phase map.

List < list < subject >> search list = [ find 'map*' In ALL FIELDS RETURNING
Account (ID, Name), contact, opportunity, lead ];

Note:

 The syntax of the class on Apex differs from the syntax of the FIND clause in
the SOAP API.
 In Apex, the value of the FIND cause is demarcated with single quotes.
Example:1

FIND 'map*' IN ALL FIELDS RETURNING account (Id, Name], Contact, Opportunity,
Lead. In the Force.com API, the value of the FIND Clause is demarcated with
braces.

FIND {map*} IN ALL FIELDS RETURNING account [Id,name],


contact ,opportunity,lead;
From search list , you can create arrays for each object returned.
Account [ ] accounts = (( list < accounts > ) search list [0] );
Contact [ ] contacts = [( list ) search list [0]) ;
Opportunity [ ] opportunities = ((list < opportunity> ) search list [2]) ;
Lead [ ] leads = (( list < lead> ) search list [3]);

92. Explain Javascript remoting for apex controllers?

Use javascript remoting in VisualForce to call methods in apex controllers from


javascript.

Javascript remoting has 3 parts.

 The remote method invocation you add to the VisualForce page, written in
javascript.
 The remote method definition in your Apex controller class.
 This method definition is written in apex, but there are few differences from
normal action methods.
 The response handles callback function you add to or include in your VF
page, written in javascript.

93. How to add javascript remoting to a Visualforce page?

To use javascript remoting in a Visualforce page, add the request as a javascript


invocation with the following form:

Syntax -

[namespace.] controller.method ( [parameters ...] Call back Function,


[configuration] );

94. Give some of Configuring javascript remoting requests?

Configure a remoting request by proving an object with configuration settings when


you declare the remoting request.

JavaScript remoting supports the following configuration parameters.

Name Datatype Description

Buffer Boolean Whether to group


requests executed close
to each other in time into
a single request. The
default is true.

Whether to escape the


Escap Boolean apex methods response.
The default is true.

The timeout for the


Static Resource request
Timeout Integer
in milliSeconds. Default
is 30000(30 seconds)

95. What is a Declarative Approach?

Working on a project without code.

96. What is the Customisation / non Declarative approach?

Working on a project with code.

97. If one wants to actually compare the variable name in a query what operator
should be used?

=: is the operator used to compare.

98. When one wants to pass the collection to the query instead of passing one value
which keyword helps us?

IN - keyword.

99. What 2 are benefits we get by writing controllers?

We get Logic & Data.

100. Mention 2 reasons why we prefer VFP instead of using configuration(no coding)
things?

Multiple edits, insert, javascript, angular js can be included.

101. Difference between < apex:inputText / > Vs < apex:inputField / > ?

inputField - copy the field from any object and display on a VF page | like copy paste
work.

inputText - it will help to create a field from scratch | new creation

102. How to call javascript using in VisualForce page?


Add javascript file in Static Resource setup -> develop -> Static Resources -> click
on ‘New’ -> Name: filename and add file from local desktop and save.

103. Difference between SOQL Vs SOSL in salesforce?

SOQL- (Salesforce Object Query SOSL (Salesforce Object Search


Language) Language)
Using SOQL we can Search only on one Using SOSL we can search on many objects
object one time. at one time.
We can query only on fields whose data type
We can query on all fields of any datatype
is text, phone, and Email.
We can use SOQL in the Triggers and the
We cannot use Triggers but can in classes.
classes.
We can perform a DML operation on SQL We cannot perform DML operations on
query results. search results.

104. What is Future Annotation(@Future)?

Use the future annotation to specify that these methods are executed
asynchronously.

 Methods with future annotation must be static methods


 Methods with future annotations can only return a void type.

Syntax:

global class class_name


{
@future
Static void methodname(parameters)
{
//body of the method
}
}

105. What is the AppExchange directory?

A web directory where hundreds of app exchange apps are available to Salesforce
customers to review, demo, comment upon, and /or install. Developers can submit
their apps for listing on the appexchange directory if they want to share them with the
community.

106. Which tag is used with both radio buttons and picklists to create the selectable
values?

We use <Apex:selectoption>
107. Which field cannot be added to a custom index?

We can not add formula fields to the custom index in Salesforce.

108. What is the difference between trigger and workflow?

Workflow:

 Workflow is an automated process that fired an action based on Evaluation


criteria and rule criteria.
 We can access a workflow across the object.
 We cannot perform DML operations on workflow
 We cannot query from the database

Trigger:

 A trigger is a piece of code that executes before or after a record is inserted or


updated.
 We can access the trigger across the object and relate to that object
 We can use 20 DML operations in one trigger.
 We can use 20 SOQL from the database in one trigger.

109. What are some apex classes that are commonly used within?

Standard controller, select option, page reference, message, etc.

110. What are the effects of using the transient keyword?

The transient keyword prevents the data from being saved into the view state. This
should be used for very temporary variables.

111. What is the maximum number of field dependencies we can use in the
VisualForce page?

The maximum number of field dependencies we can use is a VisualForce page is


10.

112. What is the procedure to get the Security token in Salesforce?

Click on your Name tab, then click on Personal and you will find Reset my security
token.

113. What is a Metadata-driven development model?

An app development model that allows apps to be defined as declarative


“blueprints,” With no code required. Data model, objects, forms, workflows, and more
are defined by metadata.

114. What is S-Control?


S-Controls are the predominant salesforce.com widgets that are completely based
on JavaScript. These are hosted by salesforce but executed at the client-side. S-
Controls are superseded by VisualForce now.

115. What is wrapper class in Salesforce?

A wrapper or container is a data structure, a class type, or an abstract data type that
contains multiple collections of objects. It helps in displaying various objects on a
VisualForce page in a single table.

116. What are force platform sites?

Public websites and applications that are directly integrated with your Salesforce
organization without requiring users to log in with a username and password.

117. What is Tab in Salesforce?

A Tab is a user interface to display custom object data or other embedded web
content to a user. We have three types of tabs in Salesforce which are:

 Custom Tabs.
 Visualforce Tabs.
 Web Tabs.

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

Below mentioned is the list of templates available in Salesforce :

1. Text Template: This template can be modified or changed by any user.


2. HTML with letterhead: People like administrators and users with Edit HTML
permission can create this email template based on letterhead.
3. Custom HTML: People like administrators and users with Edit HTML
permission can create this email template without using a letterhead. It
requires knowledge of HTML or gets the HTML code to insert it into the email
template.
4. Visualforce Email Template: This template can only be created by
administrators and developers using VisualForce. It is capable of merging the
data from various records.

119. If we want to share records based on conditions like share records to a group of
users. Whose country criteria is India, What are the steps to be followed?

Setup → Security Controls → sharing settings → Click on ‘Edit’

Apex sharing: Share object is available for every object(For Account object share
object is AccountShare ). If we want to share the records using apex we have to
create a record to the shared object.

120. Is it possible to edit the VisualForce page in a production environment?


Yes, of course! We can create and edit the VisualForce pages in both the production
environment and in a sandbox. The only thing you can not do in a production
environment with a VisualForce page is adding the unique values for which you need
to do this in the sandbox.

121. Is it possible to make changes to the apex trigger/apex class in the production
function?

No, you can not do that if you want to make any edits to the apex trigger/apex class
that should be done in a sandbox environment.

122. What are the things that can be customized on page layouts?

Page layouts allow you to personalize or customize the given page objects or
records. It helps in customizing or designing the page according to your
requirements. Page layout editor helps you in customizing the pages. Using this
page, you can customize things like buttons, fields, custom links, and related lists.

123. How to invoke batch apex job (or) how to execute the batch apex job
programmatically?

We can use database.executebatch ( ) method to programmatically begin the batch


job.

Syntax:

1. Public static ID execute batch ( sObject class name)


2. Public static ID execute batch (sObject class name, integers scope)
3. The above two methods are static methods of database class. We can use
any one of the methods to execute the batch job.

Note: The class name that we are passing to the database.execute batch( ) method
should be the object of the class which has implemented the database.batchable
interface.

124. Will Visualforce still support the merge fields usage like S-control?

Yes. Just like S-Controls. Visualforce pages support embedded merge fields.

Salesforce Scenario Based Interview Questions

125. As things are time taking client wants a report wherein a single screen, without
doing anything, can see SALE PER COUNTRY. And in another report, sales per
country per mobile brand.

This can be viewed in the Summary Report.

126. As a client wants to motivate sales reps to make more efforts, they are going to
analyze the sale done by every sales report and reward them. They want a report
where they can see country-wise sell AlSO IN the SAME REPORT, sales rep wise to
sell. So they can also see in which country how the sale is & they want this analysis
to be separate but in the SAME REPORT.

This can be viewed in the Matrix Report.

127. The client wants to see data from mobile sell DB and Home Appliance sell DB
together to take the decision of the next financial year's planning. Also, the client
wants to group the sell, discount-related columns grouped together?

They can see all the required data by using the Joined Report.

128. When two objects are connected with each other using r/s, then on secondary
record the relationship will be shown using the field. On the primary record, the
relationship will be shown using a related list.

Lookup R/S:

1. It is used to connect 2 or more objects with each other as per the business
requirement.
2. It works on standard objects and custom objects.
3. It is so simple to type.
4. It helps to loosely connect 2 objects.
5. It is used whenever we don’t have much strong dependency between 2
objects.

129. There is only 2 MDR allowed per object how many custom levels it can have?

It allows three custom levels per object.

(Eg: company → Workers → Sub workers.)

130. There is an object called Employee Details, and another object called Salary
Info, think from a business perspective. If you want to combine the 2 objects, what
will you choose in the relationship?

This can be seen with Master-Detail Relationship.

131. Assume that you require PC’s in bulk and have given an order to ‘XYZ’
company & they found a bulk supplier and asked to process, what would be the
relationship between the company and the supplier?

This can be seen with LookUp Relationship.

132. Business Requirement - Assume there is a finance dept, there are many users
and they have access to an object called finance, In that object, there is a field called
“Bonus”, and in the dept 10 users, only one should not see the field?

Scenario: Creation of Permission set for the users, other than the user who should
not have the Bonus field access.

Description:
Object: profit & loss.

Users: John & Philip

Condition::

OWD: Private.

Profile of John: Finance profile.

Finance Profile: CRED: Yes | VA: No | MA: No

Permission set of john: N/A

Role: N/A.

133. Can John see records of Philip?

No, John cannot see the records of Philip.

Condition:: OWD: PRO(Public Read-only).

134. Can John see records of Philip?

Yes, now John can see the records of Philip.

(Hint: Does he have min access to work on the object & OWD= PRO).

Condition:: OWD: PRW(Public Read Write).

135. Can John edit records of Philip?

Yes, John can edit the records, Philip.

(Hint: Does he have min access to work on the object & OWD= PRW).

136. Can John delete the records of Philip?

No, now John cannot delete the records of Philip.

Profile: Sales Profile.

Users: Stephen, Philip.

User in another profile: Celia.

Condition:: Object Setting in finance profile : CRED=Y | VA=N | MA=N.

137. In the above scenario can Stephen see the record of Celia or not?

No.

138. Can Stephen see the record of Philip?


No.

Condition :: Object Setting in finance profile : CRED=Y | VA=Y | MA=N.

139. Can Stephen see the record of Celia?

Yes.

140. Can Stephen delete the record Philip & Celia?

No, he cannot delete anyone’s records.

Salesforce Admin Interview Questions

1) What is the Roll-up summary field?

We use the Roll-up summary field to calculate the values for the associated records,
for example, a related list. We can also use it for creating the values for a master
record- according to the values in detailed records. But, we must connect the master
and the detail with a master-detail relationship.

2) Explain Queues?

In Salesforce, Queues help us to distribute, prioritize, and assign the records to the
teams for sharing workloads. Queues are applicable to leads, service contracts,
custom objects, cases, etc.

3) Explain Escalation rules?

Escalation rules apply to escalation cases according to the rules specified in the
escalation rule entry. Besides rule entries, we can also create escalation actions for
determining what happens when the case escalates. The escalation rule can
reassign a case to another support agent or a support queue.

4) Explain Validation rules?

Validation Rules enable us to apply a particular logic rule to contribute to our


organization’s data integrity. We can define the conditions on the object that are not
available. For instance, if we do not want to label an opportunity as closed if the
account does not have the address.

5) What are the primary components of the workflow?

The following are the primary components of the workflow:

Criteria: Criteria is the “if” portion of the statement. We have to set criteria for the
workflow rule. First, we have to create a workflow rule and later configure the criteria.

Action: Action is the “then” portion of the statement. The action tells us what to do
when the criteria are satisfied and occurs after the workflow rule configuration. We
can add a time-dependent action or an immediate action for a particular workflow
rule.

6) Explain a Time-dependent workflow?

We perform time-dependent actions at particular times before closing the record.


Workflow re-evaluates the record after time passes. It checks whether the workflow
rule criteria are satisfied, and only then workflow rule executes the actions.

7) What is the Workflow Task and Workflow Alert?

Workflow Task

When we have to assign the tasks to a salesforce user, you haunt a workflow task. A
workflow task allocates a new task to a role, user, or record owner. It assists us in
defining different task parameters like a priority, status, due date, and subject.

Workflow Alert

Workflow Alert is an email that an approval process or a workflow rule creates in the
salesforce and is transmitted to different recipients.

8) Explain Auto-Response?

Auto-Response is about transmitting emails to leads or cases for particular record


attributes and promptly responding to customer inquiries or issues by establishing
the auto-response rule. At the same time, we can set one rule for a lead and one rule
for a case.

9) Explain Custom Labels?

In Salesforce, we use custom labels for creating a multilingual application. Using the
native language, they give information to users in the form of help texts and error
messages. We can define the custom labels as custom text values that we can
access from the Apex class or Lightning components and promptly or even the
Visualforce page. We can translate these values into the language supported by the
salesforce. Through the following path, we can access custom labels:

Setup->Search Custom Labels in Quick Find Box->Custom Labels

10) What are Sharing rules and what are the different types of sharing rules?

Sharing rules give sharing access to the users associated with the public groups,
roles, or territories. It gives a higher level of access with the exceptions, far from our
organization settings. Following are the two kinds of sharing rules:

 Criteria-based Sharing rules: Access is provided according to the record


values and not according to the record owners.
 Owner-based Sharing Rule: These rules provide access to the records owned
by the users.

11) What are Governor Limits?


To assure that no one gains resources from others, Force.com establishes various
restrictions(governor limits) that limit code execution. Salesforce must do this due to
its multi-tenant architecture, where all the customers and organizations share one
resource. If the governor's limits are not satisfied, an error will rise, and the program
execution will terminate. Following are the types of Governor limits:

 Static Apex Limits


 Per-transaction Apex Limits
 Size-specific Apex Limit
 Per-transaction Certified Managed Package Limits

12) Define the Approval process?

In Salesforce, the Approval process is a sequence of steps for approving records. An


approval process is also helpful for tracking who and when approved or rejected
something. It includes different approval models, notifying approvers, and conditional
logic for who must support.

13) What is the importance of Salesforce Chatter?

Salesforce Chatter is a social networking application that enables us to share


information and work cooperatively with each other. It helps us to build greater
employee engagement through motivation. Salesforce Chatter also provides a forum
throughout the enterprise for sharing fresh ideas and understandings. We can also
use the mobile feed for tracking our project.

14) Explain Guest users?

Guest users are the users who do not have user accounts in our organization. They
are also known as unauthorized users as they do not have to log in. We can make
the pages accessible. Unauthorized users can create or edit the records.

Generally, we have various limitations and considerations for assessing. Yet, we can
use this feature for solving use cases, and we do it financially because the guest
user licenses are free.

15) Explain Change Set?

A changeSet is a group of components that we can migrate between the associated


organizations (like from a sandbox to the production, sandbox to the sandbox, etc.).

Salesforce Developer Interview Questions

Here is the list of most frequently asked Salesforce interview questions and answers
discussed below

1) What is Apex test coverage?

To assure that our code satisfies particular standards, Apex test coverage displays
to you how many lines of code in our classes or triggers have been tested by the
tested methods. Test coverage percentage is the result of the number of the covered
lines divided by the sum of uncovered lines and covered lines. To deploy to
production, we need a minimum of 75% test coverage.

2) Explain Lightning Message Service(LMS)?

Lightning message service is a distinctive salesforce feature that allows interaction


between Aura, Lightning Web Components, and Visualforce over the same lightning
page. We can use the Lightning message service in Lightning Experience only.

3) Define OAuth?

OAuth is a standard for access delegation. Generally, we use it as a method for


granting the applications or websites access to their data over other websites, yet
without providing them with the passwords.

4) Explain Connected App?

Connected App integrates the salesforce through APIs, and Connected Apps utilize
OAuth, SAML for authenticating, providing sign-on, and providing tokens for using
the Salesforce APIs.

Besides OAuth capabilities, connected apps eagle salesforce admins to establish


different security policies and possess external control to utilize similar apps.

5) What is the Significance of Outbound Message?

Outbound Message is an automation function that can shoot from the workflow rule.
We can send the message to explicit web services that include web services, which
start other processes in explicit systems.

6) What are the uses of External ID fields?

We can define specific fields as an External ID on the object. We can use these
External ID fields for balancing the data from explicit systems with a distinct
reference ID.

For instance, if we have to balance the data from the explicit accounting system with
the Salesforce Accounts, we have to promptly use an external ID field to refer to the
unique ID of the accounting system in place of the Salesforce ID.

7) How can we create partial page refreshes?

First, we have to define the page section that is going to be refreshed, and then we
have to define the event that leads to refreshing. The method changes if the area
being refreshed is similar to the one managing the event. It also relies on if we are
processing on the server or if we have to change the user interface.

8) How can we invoke the javascript controller action by using a component markup?

By using the action provider, we can invoke the javascript controller action through a
component markup
9) What are component and application events?

Application events

By using any component, we can fire the application events, and we can manage
them. Application events do not need any relationship among the components;
however, these components should be a part of an application.

Component events

Child components fire the component events, and Parent components handle the
component events. We use component events when we have to send a value from
the child component to the parent component.

10) What is Pagination, and How can we achieve it?

For example, if we have to display 100 records over the page.

 First: Display the first ten records.


 Previous: Display previous ten records.
 Next: Display the following ten records.
 Last: Display the previous ten records.

We can perform the above process through Pagination. We can achieve pagination
through the following ways:

Through StandardSetController
Through Offset and Limit keywords in SOQL Query

11) How do we display error messages on the VisualForce Page?

To display error messages on the VisualForce Page, we must use:

<apex:pageMessages></apex:pageMessages>

In Apex class, we must use:

ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Error,
‘Error Message’));

12) What are the differences between Custom Objects and Custom Settings?

Custom Objects Custom Settings

Custom Objects store the data in the Custom settings store the data in the
database. Application Cache memory.

Custom objects have to use SQL queries for Do not need to use SQL queries for fetching
fetching the records from the database. the records.

In custom objects, all data types exist. In Custom settings, only confined data types
exist when compared to custom objects

On Custom objects, we can create apex On List Custom settings, we cannot create
triggers and validation rules. apex triggers and validation rules

We can create a tab for custom objects. We cannot create a tab for custom settings

13) Can we customize the Apex in a production organization?

We cannot customize Apex in the production organization. We must change and


deploy through a sandbox and satisfy test coverage requirements.

14) Can you give an example of Salesforce API and its importance?

Salesforce has different API’s that allow us to communicate with the system in
various ways:

REST API: REST API will enable us to integrate with the salesforce applications
through HTTP methods in either JSON or XML formats.

Bulk: Bulk API gives us programmatic access that allows us to load the data into our
salesforce enterprise rapidly.

Streaming: We can use Streaming API for receiving the notification for the changes
to the salesforce data that equal the SOQL query we define. Streaming API is
functional when we have to push the notification from server to client according to
the criteria we define.

15) Explain Bucket Fields?

Bucket Fields classify the records of the salesforce reports without any custom field
or formula; Bucket fields are available only in the reports. When we create a bucket
column, then various classifications of the group report values.

16) Differentiate isNull and isBlack?

We use isBlack() for the text fields. Since text fields cannot be NULL, even though
nothing is given as a value, ISNULL() function fetches only empty values. If we use
ISNULL() with a text field, then it returns false.

17) How does Salesforce implement Sales Tracking?

Salesforce records data on the details like customer details, sales numbers,
customer served, and repeat customers and use of these records for creating
detailed charts, dashboards, and reports. In this way, it tracks the sales of our
organisation.

18) What is the limit of the Data.com records that we can add to Salesforce?
In the user section of Data.com, we have to discover our name to see our monthly
limit. It will provide details like how many records we can export or add for this
month. The user enters setup and types the user in the Find box and chooses
prospector users.

19) Explain the methods of the Batch Apex Class?

The batch apex class deploys the database batchable interface with the three
methods as follows:

Start: We use the start method at the beginning of the batch apex job. We use it for
collecting the objects or records, for passing them to the interface for executing. It
returns a DatabaseQueryLocator object that comprises objects or the records sent to
the job.

Finish: We call this method once we finish the batch processing. We use this
method to send confirmation emails or to execute the post-processing operations.

Execute: We use this method for every batch of the records that are sent to the
method. We use this method for data processing. This method does the following:

 sObjects records list


 Reference to the DatabaseBatcheable context.

20) What are the different types of Bindings?

Following are the different types of bindings:

 Action Bindings: Action Bindings refer to action methods in the controller.


 Data Bindings: Data Bindings refer to the data sets in the controller.
 Component Bindings: Component Bindings refers to Visualforce
components.

21) Can we write Setter and Getter methods in Salesforce?

Yes, we use a getter method for returning the values for a controller. Each value
computed by the controller and shown on the page should have a getter method.

On the other way, we use the setter method to pass the user-defined values from the
page markup to the controller. In the controller, we execute the setter method
automatically.

22) Explain the Developer Console?

The developer console is an incorporated development tool that has a collection of


tools. We use these tools for debugging, creating, and testing the applications in
salesforce.org.

23) Explain packages and different kinds of packages?


The package is a collection of the components list or associated applications.
Following are the kinds of packages:

 Managed
 Unmanaged

We use managed packages for distributing and selling the applications to the clients.
Developers sell user-friendly applications and licenses by using AppExchange for
managed packages. These are entirely updatable in the event of continuous
upgrades; we perform the removal of fields or objects.

24) What are the ways to implement the metadata in Salesforce?

Following are the ways to implement metadata in the Salesforce:

 By using Change Sets


 Eclipse with Force.com IDE
 Salesforce package
 Through Migration tools

25) Explain reRender Attribute Tag?

The reRender attribute defines an elements list that we can update dynamically
through the AJAX library of the Salesforce. We do not need the entire page to
refresh. Only a part of the page detected by the components is named in the
“.rerender” attribute.

26) How can we display the Chatter Feed Record?

By using the <chatter: feed> component, we can display the chatter feed.

Example:

<apex:page>
<chatter: feed entityId=”{!$User.Id}”/>
</apex:page>

27) Explain the Blob variable?

Blob variable is the variable that is intended to gather binary data. tostring() converts
the blob back into the string.

string string1='test string';


Blob blob1 = Blob.valueof(myString);
String String2 = myBlob.toString();
System.debug(String2);

28) What is the use of apex:outputLink?


The apex: output link body comprises of image or text that we can display in the link.

<apex: outputlink value="https://mindmajix.com/" id="theLink">www.mindmajix.com


</apex:outputLink>

Most Common Salesforce FAQs

1. Is Salesforce enough to get a job?

It's not difficult to get started with a Salesforce career. Although getting an entry-level
salesforce job takes time, it is possible.

There are lots of different groups or communities on the internet. These are some
simple ways for learning Salesforce's new features. Joining such communities can
help you enhance your skills, which are necessary for obtaining a good job.

Getting trained and certified in Salesforce is another great way for a beginner to gain
relevant skills with the platform and land a job.

2. Is coding required for Salesforce?

Salesforce is a platform for creating low-code or no-code applications. If you wish to


work as a Salesforce administrator, you don't need any prior coding knowledge.

3. Why is Salesforce so popular?

Salesforce is popular because it has features that no other CRM software has,
including contact management, workflow creation, task management, opportunity
tracking, collaboration tools, customer interaction tools, analytics, and an easy,
mobile-ready interface. There are further features for marketers, such as social
network integration, marketing lead monitoring, and email integration, in addition to
these. Sales forecasting, sales communities, and sales lead monitoring are all
beneficial tools for salespeople.

4. Is Salesforce a good career?

By 2024, the Salesforce economy is expected to generate approximately 3.3 million


new jobs. It foresees a number of intriguing and promising trends, including
increased Salesforce use by small companies, a greater focus on field service and
the Internet of Things, and a streamlining of the app to appeal to a wider variety of
users.

Salesforce is expected to grow in popularity and expand into new SMB markets,
based on these positive predictions. Therefore Salesforce appears to be a viable
career option.

5. What Is the Salary Scope in Salesforce Jobs?


The demand for Salesforce skills is rising. The highest-paying career on the pyramid,
for example, is Technical Architect, with an average annual income of $138k in the
United States. In India, the average income for a Salesforce Consultant is Rs
10,40,587 per year, but it may go up to Rs24 lakh.

On the other hand, salaries are determined by the employer, location, level of
expertise, and type of certification. Naturally, if you have more credentials under your
belt, your bundle will be more expensive.

Obtain one or more Salesforce certifications if you want to land a new job with an
arsenal of in-demand skill sets or move laterally to a well-paying Salesforce job with
greater career prospects.

6. What does a Salesforce Developer do?

A Salesforce developer will have a thorough understanding of the platform as well as


hands-on experience with it. In order to create apps, Salesforce developers leverage
Apex and Visualforce, as well as frameworks like Lightning Component.

7. What are the skills a Salesforce developer should possess?

There are certain skills that any good Salesforce developer should have. These
include:

 Communication Skills: To better get your message across, whether it's


demonstrating to clients how to use the apps or giving clear instructions to
subordinates and team members, you'll need to improve your communication
skills.
 Computer Skills: One of the essential skill requirements is computer skills.
 Analytical Skills: Analyse clients' requirements and create relevant software.
 Problem-Solving Capabilities: Developers' bread and butter are dealing with
difficulties. As a developer, you are responsible for managing every stage of
software development, and you may expect difficulties to arise anytime.
 Interpersonal Skills: At some time, every skilled developer will be required to
work as part of a team.

8. What are the roles & responsibilities of a Salesforce developer?

Although a Salesforce developer's roles and responsibilities are similar to other


professional developers, for clarity and completeness, let's review them in the
context of Salesforce:

 Determine the users' requirements, and then design, test, and develop
software to suit those needs.
 Create successful project planning by designing Salesforce solutions. Add
value to the project definition, development, and deployment stages.
 Suggest improvements to existing client apps, programmes, and systems in
the form of new software.
 For internal users, create and deploy Internet- and intranet-based programs.
 Address any potential data quality issues and develop strategies to overcome
any system deficiencies.
 For future reference, document every aspect of the company's entire
inventory of applications and systems, particularly in relation to updates and
maintenance.
 Collaborate with other tech experts to develop the best software.

9. What does a Salesforce Administrator do?

Salesforce administrator is an operational role. Salesforce administrators collaborate


with internal and external stakeholders to design processes and customise the
Salesforce Platform. They assist their company's users in getting the most out of
Salesforce by customizing the platform to meet their needs. By automating business
processes, providing reports and dashboards, training people on Salesforce, and
staying on top of platform improvements, they bring innovation to the table.

10. What skills does a Salesforce admin need?

Here are the Salesforce skills an admin should have.

 Automation - Creating and maintaining processes to execute repetitive


activities.
 User management - Creating and assigning users, managing permissions
and licenses, and more.
 Data management - Directing how data is stored, gathered, analyzed, and
used.
 Security - Ensuring that only the appropriate users have access to the
relevant data in order to protect the company and its assets.
 Reporting - Creating and managing data visualizations.
 Change management - Guiding people through upgrades or modifications to
past processes.
 Troubleshooting - Resolving org and user issues.

11. What are the certifications available in Salesforce?

Salesforce offers over 40 different certifications, including Admin, Consultant,


Developer, Architect, Marketer, and Designer.

The following are the most in-demand Salesforce certifications:

 Salesforce Certified Administrator


 Platform App Builder
 Sales Cloud Consultant
 Platform Developer I
 Platform Developer II
 Salesforce certified JavaScript Developer I
 Salesforce Data Architecture & Management Designer Certification
 System Architect Salesforce Certification
 Salesforce Marketing Cloud Administrator
 Salesforce Marketing Cloud Consultant
 Salesforce Marketing Cloud Developer
12. What are the job profiles that a Salesforce Professional can look for?

 Salesforce Admin
 Salesforce Developer
 Salesforce Marketer
 Salesforce Business Analyst
 Salesforce Functional Consultant
 Salesforce Architect
 Implementation Experts
 CPQ Specialists

13. What Is Expected On A Salesforce Developer’s Resume?

A Salesforce Developer's resume should include technical skills, executed projects,


experience, education, and more. Salesforce Developers typically add certifications,
Trailhead rank, and the number of Trailhead badges earned to their resume.

Here are a few suggestions to keep in mind while creating your Salesforce
Developer CV. Since the Salesforce Ecosystem is so vast, you'll probably be familiar
with a number of Salesforce tools, technologies, and services. You must choose to
highlight experiences that the recruiter finds appealing.

14. General skills recruiters are looking for

 Communication
 Customer Service
 Problem-solving
 Project Management

15. Technical and specialized skills recruiters looking for

 Proficiency with Salesforce Platform and Lightning Web Components


 JavaScript
 Application Lifecycle Management
 Object-oriented Programming
 Apex
 System Integration
 SOQL / SOSL
 Web Services

Tips to Prepare for Salesforce Interview

Salesforce Interview Preparation

Although there are many opportunities for Salesforce professionals in the market,
this does not mean that you should ignore the necessity of being well-prepared for
every interview that you attend.

You may only get one chance to impress a potential employer. Follow our tips to give
yourself the best and succeed in the interview.
Research the Company: We are sure that everyone views a company's website
before attending an interview, but it is no longer sufficient.

We recommend that you look at the company's social media accounts (Instagram,
Twitter, Facebook, etc.) to get a sense of the company's culture. You should also
look at LinkedIn company sites, hashtags, Google news, and anywhere else where
information about a firm is stored online.

Take a look at Glassdoor, but as with any review-based platform, be prepared to


create your own impression rather than being misled by disgruntled former
employees who may or may not have worked in the same department as you.

Understand what the recruiting manager is looking for: It's important to know
what the hiring manager is looking for, not simply the job title.

Either a job description or a Recruitment person should be available to you. If the


Recruitment professional does not have the information you need for any reason,
prepare a list of questions for them to answer before you meet with their client.

Use real-life examples: It may sound simple, but it's surprising how many times
after an interview, we speak with a Salesforce professional and they recollect a
previous accomplishment that they had forgotten about due to interview anxiety or
other causes.

To set yourself apart, make sure you prepare particular facts and speak about your
previous-role accomplishments.

Research the hiring manager: Perhaps not as entirely as you stalked the company,
but be well-prepared for the interview by knowing:

 The role of the recruiting manager, how long they've been with the company,
and who's on their team are all factors to consider.
 Where they've previously worked and with whom they've collaborated
 They may post work-related content in professional groups that they are
members of.
 Any interests you have in common could be a good fit.

Prepare some common interview questions: While you can't predict what the
company will ask, you may prepare by familiarising yourself with popular interview
questions from StackOverflow and other communities.

2.What is the benefit of Salesforce CRM?

Here are some of the top benefits of Salesforce CRM:

 Ensuring faster and better sales opportunities


 Deploying an analytical approach to customer acquisition
 Reducing costs and improving customer satisfaction
 Automation of repetitive and less important tasks
 Improved efficiency and enhanced communication on all fronts
Know more about the Importance of Salesforce Certification Training.

3. What are custom objects in Salesforce?

Simply put, custom objects are database tables in Salesforce.

All data related to an enterprise can be stored in Salesforce.com, and for that, there
is a need for a junction object, which is a custom object. The custom object has a
master-detail relationship. We can create a master-detail relationship between two
objects and then connect a child object as a related list. Custom objects, which can
be listed in custom settings, have a set of static data that is reusable.

In the process, the custom object has to be defined first, and then the below-
mentioned steps need to be followed:

 Join records with the custom object


 Custom object data is displayed in custom lists
 Create a custom tab for the custom object
 Build page layouts
 Create a dashboard and a report for analyzing the custom object

Moreover, the custom tab, app, and object can be shared.

4. Define object relationship in Salesforce.

In Salesforce, we can link the standard and custom object records in a related list. It
is done by the object relationship overview. Various types of relationships can be
created to connect specific business cases with specific customers. It is possible to
create a custom relationship on an object and define various relationship types.

5. List various object relations in Salesforce.

Object relations in Salesforce can be of the following types:

 One to many
 Many to many
 Master-Detail

6. What is an app in Salesforce?

An app in Salesforce is a container that contains a name, a logo, and a group of tabs
that work as a unit to provide specific functionality. Users can switch between apps
using the Force.com app’s drop-down menu at the top-right corner of every page.

7. Explain the advantages of Salesforce using the SaaS platform.

Some of the main benefits of Salesforce SaaS are mentioned below:


 Its pay-as-you-go model perfectly suites all customers
 No hassle with infrastructure management
 All applications are accessed via the Internet
 Easy integration between various applications
 The latest features are provided without any delay
 Guaranteed uptime and security
 Scalable performance for various operations
 Ability to access via mobile devices from anywhere

Want to learn about Salesforce? Check out our Salesforce Tutorial for
beginners.

8. How does Salesforce deploy sales tracking?

Salesforce is very meticulous when it comes to recording intricate details such as


sales numbers, customer details, customers served, repeat customers, etc.
Salesforce makes it easy to create detailed reports, charts, and dashboards for
keeping track of sales.

9. What are Workflows in Salesforce? What are Actions in a workflow?

A workflow in Salesforce is basically a container or business logic engine that


automates certain actions based on particular criteria. If the criteria are met, the
actions get executed. When they do not, the record will get saved but no action will
be executed.

There are two types of actions in a workflow in Salesforce, which are mentioned
below:

 Immediate Actions: Actions that get executed immediately when the


record is created or edited
 Time-Dependent Actions: Actions that get executed after a certain
duration of time, such as 10 days before a records’ close date. After a
certain time period, the workflow rules in Salesforce will re-evaluate the
record just to make sure that the rule criteria are met. If the record meets
the criteria, the aligned actions will be executed.

10. What is a Master–Detail relationship?

A master-detail relationship is basically a parent-child relationship in which “master”


represents the parent and the other “details” represent the child. If the parent is
deleted, then the child also gets deleted. Roll-up summary fields can only be created
on master records, which will calculate the SUM, AVG, and MIN of the child records.

11. What is a connected app?

A connected app is a framework used to integrate an application with Salesforce with


the help of APIs and standard protocols. It uses standard SAML, OAuth, and OpenID
Connect protocols to authenticate, authorize, and provide single sign-on (SSO), for
external apps. With the help of the connected app, Salesforce admins can set up
security policies and control who uses the corresponding apps.

12. Can two profiles be assigned to one user?

Depending on the profile assigned, users gain access to Salesforce. One profile can
be assigned to many users. Let’s consider an example scenario where the admin
creates a sales profile. Now, the admin has to give access to one sales profile to
multiple members of the sales team.

However, the admin cannot give a user gain access to more than one profile
because sales reps should only have access to the sales profile. So two profiles
cannot be assigned to one user.

13. What are the Salesforce subsidiaries?

The following is a list of some major Salesforce subsidiaries:

Tableau

1. Pardot
2. Heroku
3. Mulesoft
4. Demandware Inc
5. SalesforceIQ

14. What is an Audit trail?

If an organization has various Salesforce administrators, the audit trail lets you track
all the recent changes made by other admins. It can store up to six months’ worth of
data.

15. What happens to the Detail (Child) record when a Master (Parent) record is
deleted?

In a master-detail relationship, when a master record is deleted, the detail record


also gets deleted automatically.

On the other hand, in a lookup relationship, the child record will not be deleted, even
if the parent record is deleted.

16. Can you have a roll-up summary field in the case of a Master–detail
relationship?

Yes, we can have a roll-up summary for a master-detail relationship but not for a
lookup relationship. This is because a roll-up summary field is used to display a
value in the master record based on the values of a set of fields in the detail record.
17. What is an sObject type?

An sObject is any object that can be stored in the Force.com platform database.
Apex allows the use of a generic sObject abstract type to represent any object.

For example, ‘vehicle’ is a generic type, and ‘car’ and ‘motorbike’ are concrete types
of ‘vehicle’.

18. What are triggers in Salesforce? How are they different from workflows?

Triggers in Salesforce are called Apex triggers. These are distinct and available
specifically for common and expected actions like lead conversions. It is just a piece
of code that is executed before or after a record is inserted or updated.

A trigger is different from a workflow, as the former is a piece of code, whereas a


workflow is an automated process that uses no code.

19. What is trigger.new?

Trigger.new returns a list of records that have been added recently to sObjects. The
records that have yet to be saved in the database are returned. Only insert and
update triggers have the sObject list, and records can only be modified
before.trigger.

20. What is the minimum test coverage required to deploy a trigger?

 System Administrator: Customization and administration of an


application
 Standard User: Can edit, view, update, or delete one’s own record
 Read Only: Able to just view the records
 Solution Manager: Comes with the standard user permission but can
also manage categories and published solutions
 Marketing User: Able to import leads into the organization, along with
standard user permissions

21. Explain the Force.com platform.

Force.com is the entire infrastructure and codebase on which the complete


Salesforce application exists. In other words, Salesforce is built on Force.com, which
is a Platform as a Service (PaaS) that lets us simplify the design, development, and
deployment of cloud-based applications and websites. Salesforce Developers can
work with Cloud Integrated Development Environment (IDE) and deploy the
applications on Force.com servers.

22. List the various types of reports available in Salesforce.

Mentioned below are the various types of Salesforce reports:


 Tabular Report: In this report, the grand total is displayed in a table
format.
 Matrix Report: This is an in-depth report wherein there are both row and
column-based groups.
 Summary Report: A summary report is a report in which the grouping is
on a column basis.
 Joined Report: Joining two or more reports into one creates a joined
report.

23. How many reports can be added to the Salesforce dashboard?

A Salesforce dashboard can be seen as a visual and pictorial representation of a


dashboard with the facility to add up to 20 reports.

24. Explain the various Salesforce dashboard components.

The various Salesforce dashboard components are explained below:

 Gauge: It is used for showing a single value within a range of custom


values.
 Metric: This is used for displaying a single key–value pair. It is possible to
click the empty text field next to the grand total and enter the metric label
directly on the components. All metrics placed above and below one
another in the dashboard column would be displayed as a single
component.

Other dashboard components are explained below:

 Table: The report data can be shown in column form using a table.
 Visualforce Page: It is used for creating a custom component or showing
information that is not available in other component types.
 Custom S-Component: This contains the content that is run or displayed
in a browser like an Excel file, ActiveX Control, Java applet, or custom
HTML web form.

25. What is Visualforce in Force.com?

Visualforce can be defined as the user interface for the Force.com platform. It is a
component-based framework that can include over 100 in-built components. It
includes a tag-based markup language, and each Visualforce tag corresponds to a
page or a field.

The Visualforce framework works on the standard MVC paradigm. It is possible to


have tight integration with the database and also deploy auto-generated controllers
for database objects. Developers can use Apex codes to write their own
controllers. They can access AJAX components or even create their own
components.
26. What is a static resource in Salesforce?

A static resource lets us upload content that is in the form of .jar and .zip formats,
style sheets, JavaScript, and so on. It is recommended to deploy a static resource
rather than uploading files to the Documents tab since it is possible to pack a set of
files into a directory hierarchy and upload it. These files can easily be referred to a
Visualforce page.

27. Differentiate between Salesforce Object Query Language and Salesforce


Object Search Language.

 Salesforce Object Query Language (SOQL) lets us search for only one
object. We can query for all types of fields in SOQL. Data Manipulation
Language (DML) operations can be performed on the query results.
 Salesforce Object Search Language (SOSL) lets us search for multiple
objects. However, in SOSL, we can query only for texts, emails, and
phone numbers. Also, DML operations cannot be performed on the
search results.

28. What are the different methods of Batch Apex class?

Database.Batchable interface contains three methods that must be implemented:


Start method:
global (Database.QueryLocator | Iterable<sObject>)
start(Database.BatchableContext bc) {}

Execute method:
1 global void execute(Database.BatchableContext BC, list<P>){}

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

29. What is the difference between Standard and custom controllers?

 Standard Controllers: Standard controllers are created for all standard


Salesforce pages. They consist of the same logic and functionalities that
are utilized in any standard Salesforce page. They can be easily utilized
with both standard and custom objects.
 Custom Controllers: Custom controllers are a class written in Apex that
overrides the standard functionality of a standard controller of a page. It
executes the logic of a page without utilizing the Standard Controllers. We
use custom controllers whenever we want to run a Visualforce page fully
in system mode, which means that the security and permissions of the
current user will not be recognized.

30. What are the different data types that a standard field record name can
have?
A standard field record consists of either an auto-number or text field read-only data
type with a maximum limit of 80 characters. It depends on whether the field name
consists of a unique text ID or a numerical ID.

To create auto numbers, the format should be described while defining the field, and,
later, when every record is added, the number gets auto-generated. For example :
1Sr No-{1}
2Sr No-{2}

31. Where we can use Lightning components?

We can use Lightning components for a variety of purposes, some of which are
mentioned below:

 To drag-and-drop components in the Lightning App Builder and


Community Builder.
 To add more Lightning Components to Lightning Pages.
 To add Lightning Components to Lightning Experience Record Pages.
 To override Standard Actions.

32. What are the tools included in Lightning?

 Lightning Component Framework – It provides components and


extensions that can be utilized to develop reusable custom components,
standalone apps, and customize the Salesforce1 Mobile App.
 Lightning App Builder – An UI tool that lets you build apps rapidly with
the help of drag-and-drop components provided by Salesforce.
 Lightning Connect – An integration tool to easily integrate Salesforce to
consume data from any external source using the OData specification.
 Lightning Process Builder – Lightning Process Builder in
Salesforce is a visualization tool for the automation of business
processes.
 Lightning Schema Builder – It is a visualization tool used to view
and create objects, fields, and relationships.

33. What are Governor Limits in Salesforce?

Governor limits are some of the biggest challenges for a Salesforce developer.

As and when the Apex code exceeds the limit, it issues a run-time exception, which
cannot be handled. The following is a list of some of the key governor limits in
Salesforce:

 Push Notification Limits


 Per-Transaction Apex Limits
 com Platform Apex Limits
 Size-Specific Apex Limits
 Miscellaneous Apex Limits
 Static Apex Limits
 Email Limits

Advanced Salesforce Interview Questions for Experienced Professionals

34. What are the different types of collections in Salesforce Apex?

Collections are the type of variables used to store multiple numbers of records
(data). The different types of collections in Salesforce are mentioned below:

 Lists
 Maps
 Sets

35. What are maps in Apex?

Maps are used to store data in the form of key–value pairs, where each unique key
maps to a single value.
Syntax:
1 Map<String, String> country_city = new Map<String, String>();

36. What is an Apex transaction?

An Apex transaction represents a set of operations that are executed as a single


unit. These operations include DML operations that are responsible for querying
records. All the DML operations in a transaction either get completed successfully or
get rolled back completely if an error occurs even in saving a single record.

37. What is the difference between public classes and global classes in
Salesforce Apex?

A global class is accessible across the Salesforce instance, irrespective of


namespaces.
Whereas public classes are accessible only in the corresponding namespaces.

38. What are getter and setter methods?

The get (getter) method is used to pass values from the controller to the VF page.
Whereas, the set (setter) method is used to set the value back to the controller
variable.

39. Which fields are automatically indexed in Salesforce?

The following fields are automatically indexed in Salesforce:

 Custom fields marked as an external ID or a unique field


 Primary keys (ID, Name, and Owner fields)
 Audit dates (such as SystemModStamp)
 Foreign keys (Lookup or Master-Detail relationship fields)

40. A time-dependent workflow action cannot be created for which workflow?

Time-dependent actions in workflow rules can not be added when the following
actions occur.

 When workflow rule is in active state.


 When the workflow rule has pending actions and is deactivated.
 When the workflow rule criteria of a record are set to: created, and every
time it’s edited.

42. What is an Apex class?

An Apex class is a template from which Apex objects can be created. These classes
consist of other classes, variables, user-defined methods, exception types, and the
static initialization code.

43. What is Salesforce CRM?

It is a cloud-based CRM that doesn’t require IT experts to set up or manage the


cloud. One can simply log in and connect to the customers directly. The Salesforce
CRM system is a well-organized platform that provides information to its customers
from different sources. It is a customer-centric system that integrates customers’
information for an organization’s benefit.

44. What is Salesforce Lightning?

Salesforce Lightning is a platform that provides tools for every organization to build
next-generation UI and UX in Salesforce. Lightning creates a modern productivity-
boosting user experience. It is used to create a fast, beautiful, and unique user
experience, just like real lightning, so that sales teams can sell their products faster.
Lightning Experience uses the open-source Aura framework. It is a completely re-
designed framework to create a modern user interface.

45. Why use Batch Apex instead of Normal Apex?

There are various reasons why Batch Apex is better than Normal Apex, some of
which are mentioned below:

 A Normal Apex uses 100 records per cycle to execute SOQL queries,
whereas a Batch Apex does the same in 200 records per cycle. So, it is
very fast when considering the execution of SOQL queries.
 A Normal Apex can retrieve 50,000 SOQL queries, but in a Batch Apex,
50,000,000 SOQL queries can be retrieved.
 A Normal Apex has a heap size of 6 MB, whereas a Batch Apex has a
heap size of 12 MB.
 When executing bulk records, Normal Apex classes are more vulnerable
to encountering errors as compared to batch Apex. The latter is normally
error-free.

46. How can you call an Apex class in Salesforce?

The following are the ways to call an Apex class in Salesforce:

 From the Visualforce page


 From the Developer Console
 From JavaScript links
 By using a trigger
 From another class
 From the home page components

47. How will you create a many-to-many relationship?

A many-to-many relationship can be created by using a junction object.


A junction object is a custom object that has two master-detail relationships.

48. What are the different types of Reports available in Salesforce?

Based on the structural differences, Salesforce has four different types of reports:
Tabular A tabular report displays data in the form of an Excel-like table that
Report provides a list of items with the grand total.
Joined A joined report is a combined report that has multiple blocks that show
Report data from different reports, either of the same type or of different
types.
Matrix A matrix report works in two-dimensions and allows you to group
Report records row- and column-wise.
Summary In a summary report, the view is in tabular form itself, but it has more
Report functionalities like grouping rows (only), viewing subtotals, and
creating charts.

49. How does Salesforce track sales?

There are unique procedures followed by every company for tracking their sales.
Various companies track the performance of sales through data analysis. The
tracking system of Salesforce allows companies to collect basic details for evaluating
the performance, such as:

 Customers who are served daily


 Number of daily sales
 Day-to-day reports of sales from Sales Managers
 Sales figures on a weekly, monthly, or quarterly basis, depending on
organizations’ needs
 Details of the repeat customers who serve as the key factor for the growth
of any organization

50. What is a junction object?

Junction objects help associate two objects. They are custom objects in Salesforce
that allow to build a master-detail relationship that is established between two
different data objects. It uses a many-to-many relationship to link many junction
objects to several records.

Example: If a candidate applies for a job, then the job profile can be connected to
many applicants, and the candidate can be linked to several other jobs as well. Here,
the junction object will be the ‘job profile.’

52. What is a wrapper class in Salesforce?

A wrapper class is a type of container class in Salesforce that contains a group of


objects as its segments. Also, the wrapper class is of an abstract data type.

In Salesforce, we use a wrapper class to envelop collected data. A programmer


defines the wrapper class that acts as a custom object, along with its properties.

Moreover, the instances of a wrapper class help represent distinct objects in the
corresponding table on a Visualforce page.

53. What are the reasons that can cause data loss in Salesforce?

There are various reasons that cause the Salesforce data to be lost, and they are
mentioned below:

 Altering the date and time


 Converting parameters such as number and currency from other data
types
 Importing data that, at times, goes wrong
 Moving the text, URL, or email from the text area
 Altering the auto-number and the checkbox
 Modifying the multi-select picklist to other types

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

Salesforce provides the following APIs for developers to easily integrate across
Salesforce:

REST: With the help of the REST API you can easily incorporate Salesforce
applications using HTTP methods in either XML or JSON formats. It is the most
suitable choice for developing mobile applications or external clients.

Bulk: The Bulk API provides us with programmatic access especially for quickly
loading and querying large amounts of data into your Salesforce organization.
Streaming: The Streaming API is used to trigger and receive notifications whenever
changes are made to Salesforce data, according to the defined criteria.

55. Can you edit an Apex trigger/ Apex class in the production environment?
Can you edit a Visualforce page in the production environment?

No, we cannot modify Apex classes or triggers directly in the production


environment. It should be done first in the Developer Edition or testing org or in
sandbox org. Then, a user with Author Apex permission can deploy it in production,
which overwrites the last version.

Visualforce pages can easily be generated and modified in sandbox and production,
as well, if they do not comprise a custom controller.

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

Mentioned below is a list of email templates that can be created in Salesforce:

1. Text: Text templates can be created or changed by all the users in the
organization.
2. HTML with Letterhead: Admins and users who have ‘Edit HTML
Templates’ can create this type of template based on a letterhead.
3. Custom HTML: It is an extension of the previous one. Admins and users
with ‘Edit HTML Templates’ can create custom HTML templates even
without the need for a letterhead.
4. Visualforce: Admins and developers can create this template using
Visualforce. It provides advanced functionalities like merging recipient’s
data from multiple records.

57. In how many ways we can share a record?

With the help of the following methods, we can share records in Salesforce:

 Role Hierarchy:
Whenever a user is added to a role, the user above the current user in
the role hierarchy will have access to records and will inherit permissions.
Setup → manages users → roles → setup roles → click on ‘add role’ →
provide name and save.
 OWD:
Organization-Wide Default (OWD) lets you set up public read-only or
public write-only for users across the organization.
Setup → Security Controls → sharing settings → Click on ‘Edit’
 Manual Sharing:
The owner or person higher in the role hierarchy can give manual access
to users or a group of users to recordsfiles.
Interviewer: What is Salesforce Integration and why is it important?

Interviewee: Salesforce Integration is the process of connecting Salesforce with


external systems to exchange data and automate business processes. It is important
because it allows data synchronization, real-time updates, and seamless
collaboration between Salesforce and various applications, databases, or services.

Interviewer: What are the different types of Salesforce Integration?


Interviewee: Salesforce supports several integration patterns, including:
•Point-to-Point Integration: Direct integration between Salesforce and a single
external system.
• Middleware Integration: Integration using middleware platforms like MuleSoft, Dell
Boomi, or Informatica Cloud.
• API Integration: Utilizing Salesforce APIs (REST, SOAP, Bulk, Streaming) to
integrate with external systems.
• Event-Driven Integration: Integrating Salesforce with messaging systems or event-
driven architectures.

Interviewer: What is webservices?


Interviewee: Web services are software systems designed to facilitate
communication and interoperability between different applications or systems over a
network, typically the internet. They provide a standardized way for applications to
exchange data and invoke functionality across different platforms, programming
languages, and architectures.
Web services operate based on a client-server model, where a client application
sends a request to a server application, and the server processes the request and
sends back a response. The communication between the client and server occurs
using standard web protocols such as HTTP (Hypertext Transfer Protocol).

Web services use a set of protocols and standards to define the rules and formats
for data exchange. The most common protocols used in web services are:
• SOAP web services.
• RESTful web services
SOAP (Simple Object Access Protocol): SOAP is a protocol that defines a
standardized format for structuring messages exchanged between web services. It
uses XML (Extensible Markup Language) to encode data and provides a mechanism
for remote procedure calls.

REST (Representational State Transfer): REST is an architectural style that uses


standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on
resources identified by unique URLs. RESTful APIs (Application Programming
Interfaces) follow this style and are widely used for building web services that are
simple, lightweight, and scalable.
Interviewer: Explain the use of Salesforce APIs in Integration.
Interviewee: Salesforce APIs are essential tools for integration, allowing seamless
connectivity and data exchange between Salesforce and external systems. These
APIs serve as a bridge that enables different applications to communicate and work
together effectively. They provide a standardized way to interact with Salesforce’s
vast ecosystem of data and functionality.
Salesforce provides various APIs to interact with its platform:
• REST API: Enables you to access and manipulate Salesforce data using standard
HTTP methods.
• SOAP API: Allows you to integrate with Salesforce using the SOAP protocol.
• Bulk API: Facilitates the processing of large volumes of data asynchronously.
• Streaming API: Provides a stream of real-time data updates from Salesforce.
• Metadata API: Manages metadata components such as objects, fields, and layouts.

Interviewer: How can you integrate Salesforce with an external web service?

Interviewee: Salesforce supports the integration with external web services through
the usage of the SOAP or REST APIs. You can consume or expose web services in
Salesforce by generating Apex classes using the WSDL or by making HTTP callouts
to the external service endpoints.

Interviewer: How can you schedule an integration job in Salesforce?


Interviewee: You can schedule integration jobs in Salesforce using two approaches:
• Using Apex Scheduler: Create an Apex class implementing the `Schedulable`
interface and schedule it using the Apex Scheduler.
• Using Workflow or Process Builder: Set up a workflow or process that triggers an
outbound message or an Apex callout to initiate the integration.
MIND IT !
To schedule an integration job in Salesforce, you can use the Apex Scheduler
feature. The Apex Scheduler allows you to define a class that implements the
Schedulable interface, which can then be scheduled to run at specific intervals or
times.

Interviewer: What is the Salesforce Data Loader, and how is it used in


integration?
Interviewee: Salesforce Data Loader is a client application used to import, export,
update, and delete data in Salesforce. It is commonly used for bulk data operations
during integration. With Data Loader, you can load data from various sources like
CSV files, databases, or other Salesforce orgs.
Why is Salesforce important?
Salesforce is important because it allows businesses to connect with their customers
in a more efficient way. It also allows businesses to automate their sales and
marketing processes, which can save a lot of time and money.
3. What are the features of Salesforce?

There are various features of Salesforce that include:

 Sales Data:
 The Salesforce CRM is helpful in getting the right sales data
that helps you to make the right decisions in the business.
 By using the Sales data, you can easily plan your next steps
which can be for increasing sales and marketing with
increasing productivity with accurate data.
 Mobility:
 The salesforce CRM is portable as you can also use its
Mobile App that will turn your smartphone into a portable
sales office and you can see your dashboards anytime with
the app.
 It also gives you options to log calls, respond to new leads,
and many more.
 File Sync and Share:
 With Salesforce, you can easily share your files and sync
them to track the content in real time.
 Searching for files in Salesforce is easy and you can also
subscribe to its alters that will give you time-to-time
notifications when any changes are incorporated into the
files.
 Sales Forecasting:
 Salesforce provides you to give credits to the right person
and track their progress individually by using forecasts as per
overlays.
 You can also track the journey of the leads to find out if they
are interested in the deals or not. It is very helpful in sales to
analyze the leads through its brilliant forecasting.
 Lead Management:
 The Salesforce app works like a fast lead converter machine
that keeps you informed about the new leads and their
sources. Its automatic emailing system is very helpful to
reach out to your customers and boosts the revenue-
generating system.
 The lead management of Salesforce gives time-to-time
updates on the contacts and also uses the sales path to
understand the related documents that are needed in lead
management.
 Contact Management:
 Salesforce can be used to get the complete details about the
customer and that data is useful to analyze if they are
interested in your particular service or product.
 It makes contact management easy for you by providing
critical data of the leads and customers and their interaction
history with your products, services, etc.
4. What are the benefits of a cloud solution such as Salesforce?

Some benefits of Salesforce are that it can help manage customer data, automate
and streamline processes, and provide insights into customer behavior. Additionally,
Salesforce can help sales teams increase productivity, close more deals, and
improve customer relationships.

Check out the sales management course to learn how to effectively manage your
sales team.

5. What is an object in Salesforce?

Objects in salesforce are considered as database tables that are used to store
important data and other information about the organization. Additionally, it also
provides more features to the company. Salesforce has two types of objects as
follows:

 Standard Object: These objects are already available on the


Salesforce platform, including contacts, cases, leads, products,
services, contracts, reports, dashboards, opportunities, etc.
 Custom Object: These objects can be created on the Salesforce
dashboard and can be used to store other important information about
an organization. Custom objects give also give you an option of data
sharing. These objects include custom fields, page layouts, and a
custom user interface for dashboards and reports, etc.

6. What is an Audit trail in Salesforce?

An audit trail is helpful in tracking the changes that you and other administrators
made in the Setup. This feature is very useful when there is more than one
administrator in an organization. It provides you with a history of the 20 most recent
setup changes that are made to your organization and you will also come to know
who made these changes. This way, you will always get to know who modified the
project at what time.

The information that you get in the Audit Trail history includes the changes that are
made, the person who made the changes, and the time and date when the change
has been made.

7. What is a junction object in Salesforce?

Salesforce provides various types of relationships with objects that help you to
connect objects in different ways. A junction object is useful when you want to create
many-to-many relationships in Salesforce. This object is useful when a normal
parent-child or one-to-many relationship is not applicable. They can be created by
custom objects and then relating these objects with two relationships such as master
and detail relationships. It becomes important when you are modeling specific data
schemas in Salesforce. For example, a platform StudySolutions works like a junction
object as it stores many-to-many relations between the study object and the solution
object. However, the relation between the study object and the solution object is a
junction relationship in Salesforce.

8. What are validation rules in Salesforce?

The validation rules in Salesforce are helpful to enforce the integrity constraints of
the data. In the validation rule, we give several conditions in the formula editor such
that if a condition fails, Salesforce goes to check another condition, and so on. In
case, if all the conditions are failed it saves the record and shows a proper error
message.

Salesforce allows you to create validation rules for the objects, campaigns, users,
projects, and fields. For example, if a user is trying to make changes to the restricted
fields, then it will give him an appropriate error message and only allow when the
validation of an administration or authenticated person is done.

These rules consist of some formula or conditions that evaluates the data in more
than one field in the records to specify if the user meets the required details or not.

9. What causes data loss in Salesforce?


There can be several reasons for data loss in Salesforce that including:

 Integration Errors: These errors can be one of the reasons for data
loss in salesforce and they can occur when companies are integrating
internal systems and applications with Salesforce like marketing tools
and others. The changes to default configurations result in unexpected
behavior of the platform causing data loss or corrupted data.
 Migration Errors: Migrations are very helpful for moving a huge
amount of data somewhere else. To carry out migrations, it becomes
important to consolidate the data and make complex transformations
that increase the risk of data loss.
 Human Error: Accidents can happen anytime and anywhere. It is more
often the reason for data loss is a human intervention with the data.
Having more than one administrator can also cause data loss as all the
admins have the same permissions to access the data and any change
done by one administrator may lead to data loss.
10. What is a sObject type?

SObjects are the standard or custom objects that store the data in the database. A
single sObject variable shows a row of data that can be declared with the help of
Apex by the use of the SOAP API of the object.

For example:

Acc x = new Acc();

CustomObject CO = new CustomObject();

This is very similar to SOAP API and the apex allows the use of generic sObject to
represent any object. The new operator that we used in our code still requires the
type of sObject and therefore all instances should be specific to sObjects.

For example:

sObject x = new Custom();

11. What is an Apex transaction?

Apex transaction is used for the representation of a set of operations. These


operations are executed as a single unit and all these operations are either
completed successfully or not. This is because the entire transaction in Apex is rolled
back and if any error occurs in even a single operation, then no data is committed to
the database. The operations that come inside the transaction boundary do
represent only a single unit of operation. The apex transactions ensure the integrity
of data as the code runs as a part of atomic transactions in Apex.
All the DML operations in Apex Transactions represent a single unit only and this
also applies to the calls that are made from the transaction boundary for the external
code.

12. What is the difference between the public and global classes in Apex?

The difference between the public and global class in Apex is as follows:

Public Class Global Class

1. The method defined in a public class 1. The method defined in a global class
can be used by any Apex in the can be used by any Apex that has
application. access to the class.

2. When you declare the method as 2. When you declare a method as


public, it is not necessary to declare the global, you also need to declare the
glass that contains it as public. class that contains it as global.

3. The access modifier should be used


3. The access modifier should be
for any method outside of the
referenced anywhere in the application.
application.

13. What are getter methods and setter methods?

Getter methods: Whenever a name variable is called, this method returns a value of
that variable to the visualforce page in the Apex. Getter methods invoke the get
method of that variable and for better understanding let us have a look at the
example below:

<apex:outputlabel>{!value}</apex:outputlabel>

In this example, the value variable is used by the visualforce page when it is
declared in the class.

 Setter methods: The values from the visualforce page are taken by the
setter methods and stored in the Apex variable name. To better
understand this method, let us have a look at the example below:
public class setterMethod{

public string value;

public string getvalue(){


return value;

public void setValue(string value){

this.value = value;

In the above example, the visual force page will try to take the value from the code
and save the values to the apex variables.

14. Give an example of a custom App you could build on the Salesforce
platform.

Salesforces enables you to take customizations a level further by allowing us to build


custom applications on the platform. Sales & Service Clouds are set up with various
features that have been designed for this specific purpose. A few examples are:

 Goal setting applications to help managers track their team’s targets


and goals
 HR application to allow internal teams or recruiters to manage job
applications
 Finance systems to help with tracking of invoices and payments
15. What is the difference between data and metadata in Salesforce?

Data – The records that a business relies on. Such as accounts, contacts, users, etc.

Metadata – The data that describes other data. It is related to the fields, code,
configurations, page layouts, and logic that go into building the look of the salesforce
environment.

Salesforce Interview Questions For Intermediate

This section of the blog covers questions for professionals who already have some
experience of Salesforce but are looking to brush up their knowledge and prepare for
an upcoming salesforce interview.

16. Explain the skinny table. What are the considerations for the skinny table?

Skinny tables are useful when we want to access the fields which are most
frequently used to avoid the joins. Skinny tables improve the performance of specific
operations that are read-only types and these operations can be list views and
reports. These tables sync with the source tables whenever any source table is
modified and that’s the reason they are highly effective.

In order to use skinny tables in your Salesforce account, you are required to contact
Salesforce customer support. Because you cannot create these tables by yourself.
Therefore, you need to contact the customer support of Salesforce to create these
skinny tables.

The considerations for the skinny table are as follows:

 The table cannot hold values from other objects.


 Skinny tables are only capable of containing only 100 columns at
most.
 These skinny tables can be easily copied to the full sandbox of your
organization.
17. What is Future annotation(@future)?

 When we want to specify the methods that are executed


asynchronously, future annotations come into view. And the use of
future annotations is very helpful in specifying methods.
 The method that is specified with @future annotation, is executed only
when all the required resources of salesforce are available.
The syntax for using Future annotation is as follows:

1global class nameOfClass


2{
3@future
4static void nameOfMethod(arguments/parameters)
5{
6//method definition here
7}
8}
18. What are the different types of email templates available in Salesforce?

 The different types of email templates in Salesforce are as follows:


 HTML with letterhead: These types of email templates are accessible
to only administrators and users with permission of “Edit HTML
Templates” based on the letterhead.
 Custom HTML: These email templates can be created by users and
administrators with the permissions of “Edit HTML Templates” by using
a letterhead.
 Text: These email templates are accessible to everyone in the
organization and all the users are allowed to modify or create these
templates.
19. Can you give an example of a Salesforce API and its usage?
 There are several APIs provided by Salesforce for the developers to
interact with the system in several ways. Some of them are:
 Bulk: This API is used to get programmatic access to load and query a
huge amount of data into the Salesforce organization.
 REST: The REST API can be easily integrated with Salesforce by
using the HTTP methods in any of the formats- XML or JSON. REST
API works as an ideal API for the development of mobile applications
and clients outside of the organization.
For example, if you are required to retrieve some data about the version of
Salesforce, then you need to submit a request by using the following code:

curl https://<Instance>.salesforce.com/services/data

in the above code, you are required to replace the instance with the instance of your
organization.

And the output from the above code is as follows:

“label”: “Weather ‘11”,

“url” : “/services/data/v20.2”,

“version” : “20.2”

20. What are custom labels in Salesforce? What is the character limit of the
custom label?

The custom labels in Salesforce are the labels used by developers for developing
multilingual applications. These applications are used for the representation of the
information to the users in their native languages. Custom labels are very useful to
work with customized values as it allows users of different languages to access the
information in that application.
In Salesforce, you can create up to 5000 custom labels in which the character limit of
a single custom label is 1000. However, if the custom labels are created from
managed packages, then it doesn’t count under this limit.

21. What is an attribute tag? What is the syntax for including them?

The attribute tag is used to store the information that is to be referenced with the
lightning component of the code. Attributes on components work just like the
instance variables in objects.

The syntax for including attribute tags is as follows:

1 <action:attribute>
In the above syntax, in place of action, you can give another name to the attribute
tag for including it.

22. What are the three types of bindings used in Visualforce? What does each
refer to?

In Visualforce, we have three types of bindings such as:

1. Data Bindings: This binding refers to the data set in the controller.
2. Component Bindings: Visualforce components are referred to by the
component bindings.
3. Action Bindings: The action methods are triggered by action bindings
in visualforce.
23. What are the different types of collections in Apex? What are maps in
Apex?

Collections in Apex are the composite data types that permit the developers to
combine or collect multiple types of data into a single variable. There are three
different types of collections in Apex such as List, Map, and Set.

 List: A list is an ordered collection of elements that can be


distinguished by their indices.
 Map: Maps are also known as ‘Key/Value” pairs which mean maps are
collections with the index values having specific keys for each index
number.
 Set: Sets are just like lists where they have a collection of elements but
the only difference is that the elements are unordered in sets.
24. How can you embed a Visualflow in a Visualforce page?

There are some steps that you need to perform to embed a visual flow in a
Visualforce page:

 Go to Setup, then find the Flows in Quick Find Box and then select
Flows.
 Click on the name of the flow and copy the API’s name.
 Now, again from Setup, enter the Visualforce pages and click on define
a new visual force page.
 Add the <flow:greatlearning> component at some place between the
<apex:page> tags.
 Now you need to set up the name of your Visualflow:
 Click Save.
 If you want to restrict this visual flow to some users, then you can do
this by going to the security of visualforce pages and enabling the
profiles by adding them to them.
 Lastly, you need to add the visual force page to your application by the
use of a custom link or a button.
So, these were the steps that should be followed to add a Visualflow to Visualforce
pages.

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

There are three different methods of Batch Apex Class in Salesforce:

 Start Method: This method is called at the beginning of the apex job.
This method is called once and returns Database.QuerLocator or
variables, records, objects that passed to the job.
 Execute Method: It is called for each batch of records that are passed
to the job. The default batch size for executing the method is 200
records and the maximum number of records it can take up to is 2000
records. There is no guarantee that all the records will execute in the
order they are received from the start methods.
 Finish Method: The finish method is used for the execution of post-
processing operations such as sending an e-mail. This method is
called after all the batches are processed.
Salesforce Interview Questions For Experienced

This part of the blog on Salesforce Interview Questions covers questions that
experienced professionals may face in their upcoming interview process. It has a list
of the commonly asked questions for you to be better prepared.

27. What are WhoId and WhatId in activities?

 WhoID is used for people’s things and it uses Lead ID or contact ID in


activities.
 WhatID is used for things that are objects and it takes Account ID or an
Opportunity ID for reference in activities.
28. Can you have a roll-up summary field in case of a Master-Detail
relationship?

 You can have a roll-up summary field for the Master-Detail relationship
in Salesforce, but the lookup relationship is not well to have a roll-up
summary. Roll-up summary fields are useful when we want to show a
value in master records depending on the values of a set of fields in
our detail records. But the detail records must be related to the master-
detail relationship. There are four calculations that you can perform by
using a roll-up summary such as counting the total number of detail
records, sum, and finding the minimum or maximum value.
29. What are the examples of non-deterministic Force.com formula fields?

 The examples of non-deterministic force.com formula fields include the


following:
 Fields that have dynamic data function in them such as TODAY() or
NOW()
 Lookup Fields
 The formula fields work as a reference for other entities.

35. Is Test.startTest() and Test.stopTest() required in a test class?

Answer: Test.startTest() and Test.stopTest() exist primarily to allow you to reset


the governor limits within the context of your test execution and to be able to test
asynchronous methods. These two statements cannot be called more than once
within a testMethod. They are not required to be used but in some situations may be
critical.

39. There is a profile by name ‘ReadAccessProfile’ and two users User1 and
User2 have been assigned to it. There is an object X. I want to have ReadWrite
access for User1 and ReadOnly access for User2 for object X. How can this be
accomplished?

1. Step 1: Read Access for both users is common hence in the Profile
settings give ‘Read’ access for the object ‘X’. By doing this User U2 will
be able to read all the records( One condition satisfied) but User1 will
only be able to read the records (Second condition not satisfied).
2. Step 2: So next what we do is we create a permission set say
‘GrantWriteAccess’ and in this permission set we give the object ‘X’ the
Write access and assign the user User1 to this permission set.
(Second condition satisfied).
40. I have two objects Object1 and Object2 which are not related to each other.
Now I want to create a Master-Detail Relationship(MDR) between these objects.
How can I do this?

Answer: Scenario 1: If the two objects are new and there are no records in each.
Then we can create a Master-detail relationship by creating the field in Setup.

Scenario 2: If the two objects exist prior to this requirement and have records. If this
is the scenario then we should first create a lookup relationship between the two
objects and make sure that all the values are filled and then convert the relationship
to master-detail from lookup.

41. The requirement is to delete a set of records and don’t want them to be
stored them in the recycle bin as well. What are my options?
Answer: This can be done using the Hard Delete option. It can be done in the apex
by calling emptyRecycleBin().

42. In the before Insert event trigger which context variable is correct
Trigger.new or new Trigger.newmap?

Answer: As the event is before insert only trigger.new will be supported.

Trigger.newmap will not be supported as we do not have an id of the record before


the record is inserted.

What is the difference between profile and role? Can a user be assigned two
profiles?

Answer: A Salesforce profile controls the following key aspects pertaining


to Salesforce:

 Field Level Security – Here, the users are restricted to creating,


reading, editing, and deleting fields according to specific requirements.
 Page Layouts – This restricts the page layouts a Salesforce user is
permitted to see.
 Custom Apps – This restricts all the custom and standard apps that
can be viewed and accessed by a Salesforce user.
 Record Types – This restricts the record types available to specific
Salesforce users.
 Login – This restricts the login hours of Salesforce users onto the
platform based on specific requirements.
 Tabs – This restricts the tabs that can be accessed and viewed by
Salesforce users.
There are two major types of user profiles in Salesforce – standard profiles and
custom profiles. While a standard profile is already provided by Salesforce, a custom
profile can be created by the users based on their specific requirements.

What is a standard profile and name some of them?

Answer: A standard profile is a profile assigned to the users by Salesforce. These


profiles cannot be deleted and need to adhere to the Salesforce permission sets
assigned to them.

Some of the major standard profiles are:

1. System Administrator
2. Standard User
3. Marketing User
4. Solution Manager
5. Read-only
6. Contract Manager
What are the different ways to deploy to production?

Answer: The different ways to deploy to production are:

1. Change Sets
2. Eclipse with Force.com IDE (Deprecated)
3. Force.com Migration Tool – ANT/Java based
4. Salesforce Package
5. VSCode Salesforce Extension Pack
6. Salesforce Code Builder
52. What is the minimum test coverage required to deploy to production?

Answer: The minimum test coverage required is 75% to deploy to production. If this
is not satisfied then the apex class or trigger cannot be deployed to production.

B. Lightning Based

53. What does the lightning component bundle contain?

Answer:

The lightning component contains the following:

1. Component
2. Controller
3. Helper
4. Style
5. Documentation
6. Renderer
7. SVG
8. Design
54. Name the different lightning component models?

Answer:

The two lightning component models are

1. Aura Component Model


2. Lightning Web Component Model
55. What is Lightning App Builder?

Answer:

The lightning app builder is used to create lightning pages for the Salesforce
Lightning experience and mobile apps. The Lightning App Builder is a point-and-click
tool. Lightning Pages are built using Lightning components which are compact,
configurable, and reusable elements that can be dragged and dropped into different
regions of the page in the Lightning App Builder. It is very useful and easy to use.

We can use it to create:

1. App Page
2. Home Page
3. Record Page
56. Which language does the Lightning component use on the Server side and
Client side?

Answer: Lightning Component uses Javascript on the client side and Apex on the
server side.

57. What are the tools used in Lightning?

Answer:

1. Lightning App Builder


2. Lightning Connect
3. Lightning Schema Builder
4. Lightning Process Builder
58. What are the advantages of using Lightning?

Answer:

1. Better Performance
2. Out-of-the-box component set
3. Faster development
4. Multiple device and cross-browser compatibility
5. Event-driven architecture
6. Rich component ecosystem
59. Is there a limit to having lightning components in one application?

Answer: No, there is no limit to having lightning components in one application.

60. Where can we use Lightning Components?

Answer: We can use lightning components as:

1. Drag and drop components in Lightning App Builder and Community


Builder
2. Quick Action buttons
3. Lightning pages
4. Lightning Record pages
5. Stand-alone Apps
6. Overriding standard actions
61. How can we assign Lightning Pages?

Answer: Lightning pages can be assigned in three ways:

1. The org default


2. App default
3. App, record type, profile
62. What kind of framework does Lightning use?

Answer: Lightning uses a Component based framework.

C. Reports and Dashboards

63. What are the different types of reports?

Answer: Different types of reports are:

1. Tabular Reports (Basic type of report)


2. Summary Reports (Grouping by rows and sorting)
3. Matrix Reports (Grouping by rows and columns )
4. Joined Reports (can contain reports from different report types)
64. What is a bucket field?

Answer: A bucket field is a field that helps in categorizing records in a report. It can
be used as any other field to sort, filter or group your report.

65. What is the difference between Standard and Custom reports?

Answer: Standard reports are created by Salesforce when we create objects and
relationships. Custom report fields can be specified by the admin. We can also
associate up to 4 objects.

66. What is a dashboard?

Answer: Dashboard can be simply put as a graphical representation of reports


which can be tailored to a user and can also be set to a standard representation that
is the same for all users. Dashboards can have up to 20 components. Dashboards
show data according to the last run report.

67. What is a dynamic Dashboard?

Answer: Dynamic dashboards are used to display details according to the user’s
security settings. It does not refresh on its own. It refreshes when the page is
refreshed. Dynamic dashboards help to show data that is specific to that user and
the data to which he has access.

68. How many records can we display on a single page in a report?


Answer: Salesforce allows us to display 2000 records on a page. If we need to show
more records then the option is to export them into an excel file.

69. Can we create formula fields in Reports?

Answer: Yes formula fields can be used in all the other types of reports except
Tabular. The formula should be in currency, percent, or number type.

70. What kind of reports can be used to generate dashboards?

Answer: Summary and Matrix reports are used to generate dashboards.

71. Is it possible to delete reports using a data loader?

Answer: No, it is not possible to delete reports using a data loader.

72. What is not supported in Joined reports?

Answer:

1. Bucket fields
2. Cross filters
3. The rows display filters.

D. Trigger, Workflow, and Process Builder

73. What is a Trigger? Name the different types.

Answer: Apex triggers allow us to perform custom actions before or after events to
records in Salesforce, such as insertions, updates, or deletions. We use triggers to
perform tasks that can’t be done by other point-and-click tools in Salesforce UI.
There are two types of Triggers:

1. Before Triggers (insert, update, delete)


2. After Triggers (insert, update, delete, undelete)
74. What is a process builder? Why do we use it?

Answer: Process builder is a simple-to-use workflow tool to automate your business


process. It provides a simple graphical representation that depicts the process.
Process builder can be used to

1. Create a record
2. Update the record
3. Launch a flow
4. Send an email
5. Post to chatter
6. Submit for approval
7. Can do what all a workflow can do except for outbound messages
75. What is a workflow? What actions can be performed using it?

Answer: A workflow is an automation tool used to do simple tasks such as

1. Assigning a new task


2. Email Alerts
3. Outbound messages
4. Field Updates
76. What is an approval process?

Answer: The approval process is used to provide the user with a step-by-step guide
to approve a certain process. We can configure to send an email, create a task, etc
when the approval process reaches a certain step process. The approval process
consists of the following steps:

1. Process definition
2. Initial submission actions
3. Step definitions
4. Final Rejection actions
5. Final Approval actions
77. What is a recursive trigger and how can we avoid it?

Answer: Recursive trigger is a situation where the actions of the trigger invoke the
same trigger and it goes on in a loop. To avoid this scenario a simple step is to
create a static variable and check the state of the variable before executing the
trigger.

78. How is process builder and flow builder different?

Answer: Simply put the process builder is designed to be a simpler tool. It is much
more linear in the process as compared to Flow builder. Flow builder is much more
powerful not only in terms of the process design but also actions. Flow builder has a
delete functionality along with being able to update multiple records. It is true that
process builders are also able to update multiple records but it is limited to updating
only child records of the parent record which started the process.

79. What are the conditions which need to be specified when we need to
schedule actions?

Answer: There are two conditions that need to be specified:

1. Only when the record is created


2. When a record is created or edited and defined criteria are met
80. What is a queue?
Answer: A queue is used to hold a predefined set of objects and users. Anyone in
the queue can pick up a task assigned to the queue and can complete it. A queue
can contain users, public groups, partner users, roles, roles, subordinates, etc.

81. What are context variables and how do we use them?

Answer: Trigger Context variables (TCV) can be defined as those variables which
help us in tracking the runtime information of the current execution of a trigger. Some
of them are:

1. isExecuting: This variable returns the value true if the current context
for the Apex code happens to be a trigger and does not happen to be a
Visualforce page, a Web service, or an execute anonymous() API call.
2. isInsert: This variable returns the value true if the trigger executed is
an insert operation
3. isUpdate: This variable returns the value true if the trigger executed is
an update operation
4. isDelete: This variable returns the value true if the trigger executed is a
delete operation
5. isBefore: This variable returns the value true if the trigger was fired
before any record was saved
6. IsAfter: This variable returns the value true if the trigger was fired after
all record was saved
7. isUndelete: This variable returns the value true if the record was
recovered from recycle bin
8. new: This variable returns the list of the new versions of the sObject
records. This is only available in the insert, update and undelete
triggers.
9. newMap: This returns the list of Ids of the new version of the sObject
records
10. old: This variable returns a list of all the old versions of the sObject
records. This is only available in update triggers and deletes triggers
11. oldMap: This variable returns the list of Ids of the old versions of the
sObject records
12. size: This variable returns the total number of records invoked by the
trigger
82. What is the order of execution of Trigger, Process Builder, and workflow?

Answer: The order of execution is Trigger => Workflow => Process Builder

E. Integration and Testing

83. What is Integration? Explain.

Answer: Integration is connecting two applications. An enterprise uses a lot of


applications that are not designed or created to work with each other. Integration
helps the enterprise in getting the best efficiency, consistency, and quality of all the
applications working together. Each application can have different business logic,
data, and security layers which all need to be integrated.
84. What are the different ways to integrate into Salesforce?

Answer: There are 3 different ways to integrate into Salesforce:

1. User interface integration: Combine the UIs of two or more apps to


create composite apps with little or no rework on the UI of each
individual app.
2. Business Logic Integration: Apex Web Services is used for Inbound
and Apex Callouts for Outbound. It typically handles a scenario where
business logic is spread across several applications to implement the
complete end-to-end business process.
3. Data Integration: SOAP APIs and REST APIs are used here. It
typically handles data synchronization requirements, where one
application in an enterprise acts as the primary source for a particular
business object, like an Account.
85. How many APIs are available in Salesforce?

Answer: They are 11 different APIs. They are:

 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
86. What are webservices?

Answer: Webservices is a functionality that helps us to do integration. Web services


are open standard (XML, SOAP, HTTP, etc.) based web applications that interact
with other web applications for the purpose of exchanging data. Web services can
convert your existing applications into web applications.

87. What is JSON?

Answer: JSON (Javascript Object Notation). JSON is lighter than XML. When
transferring data between two communication channels it needs to be in Text, JSON
is text and can be converted to Javascript and vice-versa with ease. JSON is then
used to send messages between servers.

88. Why do we need test classes in Salesforce?

Answer: Test classes are used to write unit tests for Apex classes and triggers in
salesforce. We need to write test classes that have more than 75% code coverage of
the apex class and triggers. When we need to deploy apex classes or triggers in
production we need to upload the test classes along with it. If the test classes fail to
cover 75% of the code then deployment fails.

89. Syntax of a simple test Method?

Answer:

1@isTest
2private class MyTestClass {
3 static testMethod void myTest1() {
4 }
5 static testMethod void myTest2() {
6 }
7}
90. What are assert statements and why are they used?

Answer: Assert statements are used to compare what the real value is and what
the expected value is. There are 3 types of assert statements:

1. system.assertEquals(val1,val2)
2. system.assertNotEquals(val1,val2)
3. system.assertEquals(val1> val2)
91. What is seeAllData?

Answer: The test classes cannot recognize the data in the database by default and
hence we need to mention the @isTest(seeAllData=true) so that it recognised the
data in the database.

92. What all needs to be tested in Apex?

Answer: Salesforce recommends we test :

1. Single records
2. Bulk records
3. Positive scenarios
4. Negative scenarios
5. Restricted User
6.

Top Salesforce Developer Interview Questions

Format of Salesforce Developer Interview

Salesforce Developer Interview is mostly divided into 5 to 6 parts:

1. Salesforce platform interview questions


2. Salesforce configuration interview questions
3. Apex interview questions
4. Lightning platform interview questions
5. Integration-related interview questions
6. Scenario based Salesforce developer interview questions

Salesforce Platform Interview Questions and Answers

Let see the Salesforce platform related interview question and answers:

1. What is Sandbox and the Type of Sandbox in Salesforce?

A Salesforce sandbox is an isolated copy of your organization’s production


environment that is used for development and testing purposes. Your production
environment has your live data and active users logging in. A Salesforce sandbox
will always include a copy of your production organization’s metadata

Types of Sandbox in Salesforce

There are 4 types of Salesforce sandbox environments.

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

2. What is Cloud Computing?

Cloud computing is a way to access information and applications online instead of


having to build, manage, and maintain them on your own hard drive or servers. It’s
fast, efficient, and secure.

Simply put, cloud computing is a way of accessing services on the internet instead of
on your computer. You can use the cloud to access applications, data, and
development tools from virtually anywhere. Whether you’re working on your phone
from a crowded train in Chicago or on your laptop at a hotel in Hong Kong, you can
access the same information because it all lives online..

3. What is Iaas?

IaaS stands for Infrastructure as a service: A cloud service provider owns and
manages the hardware upon which your software stack runs. That includes servers,
networking, and storage. This can be a great cost-reduction strategy if you’d like to
avoid purchasing and maintaining infrastructure.
In this type of service, you will get the Virtual System that can be connected using
the internet. Where you can install any Software even in some service providers you
can install the operating system.

4. What is PaaS?
PaaS stands for Platform as a service: In this type of service, you get a
development platform bundled with all the types of software preinstalled. You will
then have to write and execute all your codes in a remote server by some
mechanism.

5. What is Saas?

SaaS stands for Software as a service: It offers the most support and is the
simplest of all delivery models for the end user. Chances are that you already use it
in your organization. This is the highest level of service in which everything is
provided from hardware to software to already build applications.

Salesforce Developer Configuration Interview Question and Answers

Let’s see the Salesforce platform configuration-related interview questions and


answers:

6. Type of Object Relationship in Salesforce?

There are six types of object relationships in Salesforce.

1. Lookup Relationships
2. Master-Detail Relationship
3. Many-to-Many Relationships (Junction Object)
4. Self Relationship
5. External Relationships
6. Hierarchical Relationships

7. What is Junction Object in Salesforce?

A junction object is a custom object with two master-detail relationships, and it is the
key to making a many-to-many relationship.

8. What is the difference between Roles and Profiles?

Profiles help to control object privileges such as CRED (Create, Read, Edit, Delete).
They also contain system permissions that a user can carry out such as exporting
data. Profile used for object level and Field level access. It is mandatory for all Users

Roles on the other hand help with sharing records across an organization. They
work in a hierarchical fashion, giving users access to records that are owned by
people lower down in the hierarchy. Roles used for Record level access. It is not
mandatory for all Users.

9. How many ways we have in Salesforce for Sharing?

There are 20+ ways to share record access in Salesforce.

1. Profile/ Permission set Object level CRED access


2. View All and Modify All permission on the profile or permission set
3. Profile level System Permission.
4. Organization-Wide Default (OWD)
5. Record Ownership
6. Role Hierarchy
7. Case Team, Account Team and Opportunity team
8. Queues
9. Sharing Rules
10. Groups
11. Territory Management
12. Sharing Sets
13. Sharing Groups
14. Super User Access
15. Manual Sharing
16. Apex Sharing
17. Visualforce with Apex
18. Implicit Sharing
19. Master Detail Relationship
20. External Account Hierarchy

10. What are Sharing Rules?

Sharing rules in Salesforce are used to create automatic exceptions to the


Organization-Wide Default settings for the users who do not own the record.

They should be applied to the objects whose org-wide defaults are set to Public
Read-only or Private because sharing rules can only extend the access they cannot
restrict the access provided by Organization-wide defaults.

There are 2 types of Sharing Rules in Salesforce based on which records to be


shared:

 Owner Based
 Criteria Based

11. How do we do Manual Sharing?

The Manual sharing button allows users to share records with others with one button
click. Sometimes we encounter a scenario where individual users want to share their
records with another colleague (user). In that case, manual sharing is the best
option.

12. What is Apex Sharing?

There are situations where the business requirement is too complex and standard
sharing rules provided by the Salesforce will not work. In that case we can use the
Apex Sharing.

To access sharing programmatically, you must use the share object associated with
the standard or custom object for which you want to share. For example,
AccountShare is the sharing object for the Account object and for MyCustomObject it
should be like MyCustomObject__Share. Here is sample code.

public static boolean apexSharingDemo(Id recordId, Id userOrGroupId){


MyCustomObject__Share myCustomObject = new MyCustomObject__Share();
myCustomObject.ParentId = recordId;
myCustomObject.UserOrGroupId = userOrGroupId;
myCustomObject.AccessLevel = 'Read';
myCustomObject.RowCause =
Schema.MyCustomObject__Share.RowCause.Manual;
Database.SaveResult[] jobShareInsertResult =
Database.insert(myCustomObject,false);
}
Learn more about Sharing and Visibility here.

13. Type of Flow in Salesforce?

Flow is an automation tool provided by Salesforce which can be used to perform


various tasks like Sending Emails, Posting chatter, Sending custom Notifications &,
etc using clicks instead of code. Check Salesforce Flow Builder training if you are
new.

Types of flows in Salesforce

1. Screen Flow: With Screen Flow you can create a custom UI (user interface)
and guide users through a business process that can be launched from
Lightning Pages, Experience Cloud (previously known as Community Cloud),
quick actions and more.
2. Record-Triggered Flow: This Flow launches when is record is created,
updated, or deleted. So far, we have used Apex triggers for these
automations some of which can now be done using Flows.
3. Scheduled-Triggered Flow: This flow launches at the specified time and
frequency for each record in a batch. Traditionally we have met this kind of
requirement using Apex batch jobs.
4. Platform Event Flow: Launches when a platform event message is received.
For example, you can pump the data from external system in Platform Events
and then use Flows to split and save the records in different objects.
5. Auto launched Flow: Launches when invoked by Apex, Process Builder or
even REST API

14. When to use Salesforce Flow and Apex?

Try not to mix Apex, Process Builders, Workflow Rules, and Record-Triggered flows.
In general, you should choose one automation tool per object.

Salesforce Flow Apex

let declarative tools handle non-DML activities like separate DML activity and
email alerts and in-app alerts offload it to Apex

15. Best practices for Salesforce Flow?

Check out the Apex hour blog post to learn about Best practices for Salesforce Flow.

1. Always! Plan Before You Build


2. “One Record-Triggered Flow” Per Object – Per Type
3. No DML Statement in Loops
4. Use the Advanced Technique to Merge Decision Node
5. Build Reusable Flow(s) – Subflow(s)
6. Don’t Create Flow for Everything
7. Build in a test/Sandbox environment
8. Supercharge Flow with Invocable Apex
9. Don’t Hardcode IDs, Query for them!
10. Dont mix Trigger, Process Builder, Flow and Record Trigger Flow
11. Handle Errors with Fault Paths
12. Exception handling in flow using Platform Events
13. Use Debug Log to Check Why a Flow Fails at Runtime
14. Flow Naming Conventions

Salesforce Developer Apex Interview Question and Answers

Let’s see the Salesforce platform Apex interview questions and answers:

16. What is Apex? and when to use Apex over Flow?

Apex is a programming language developed by Salesforce. It is a strongly typed,


object-oriented programming language that allows developers to execute flow and
transaction control statements on the Salesforce platform.

One common approach is to separate DML activity and offload it to Apex, and let
declarative tools handle non-DML activities like email alerts and in-app alerts — just
be careful and ensure none of your Apex conflicts.
17. What are Apex Best practices in Salesforce?

Apex code is used to write custom and robust business logic. As with any language,
there are key coding principles and best practices that will help you write efficient,
scalable code. Check our Apex best practices of Salesforce.

1. Bulkify Apex Code


2. Avoid SOQL & DML inside for Loop
3. Querying Large Data Sets
4. Use of Map of Sobject
5. Use of the Limits Apex Methods
6. Avoid Hardcoding IDs
7. Use Database Methods while doing DML operation
8. Exception Handling in Apex Code
9. Write One Trigger per Object per event
10. Use Asynchronous Apex

18. What is Apex Trigger? and When we should use Apex Trigger?

The trigger is a procedure in a database that automatically invokes whenever a


special event in the Database occurs. Apex triggers enable you to perform custom
actions before or after events to records in Salesforce, such as insertions, updates,
or deletions. Learn more about apex trigger here.

There lots of automation tool available in Salesforce. Lets understand the when to
use Apex Trigger in Salesforce.

1. Complex logic incapable of being processed via declarative artifacts


2. Logic associated with DML
3. Operations on unrelated objects
4. Integration with External Systems

19. What is Apex Trigger Handler pattern?

Check this blog post to learn about which all trigger patterns are available in
Salesforce. For Trigger Handler code check this post.
20. What is Apex Trigger Framework? What are different Trigger Framework
are available in Salesforce?

How many trigger frameworks are available in Salesforce, which one is a lightweight
apex trigger framework and a Comparison of different approaches? Check our Apex
hours Trigger Framework in Salesforce sessions.

Type of different frameworks in Salesforce

1. Trigger Handler Pattern


2. Trigger Framework using a Virtual Class
3. Trigger Framework using an Interface
4. An architecture framework to handle triggers

21. What is Async Apex in Salesforce? How many ways do we have for Async
processing?

In technology terminology, Asynchronous operation means that a process operating


independently of other processes.

Using Async in Salesforce – how will we do it?

1. Schedule & Batch jobs


2. Queues
3. @future
4. Change Data Capture – Apex Triggers (Summer ’19)
5. Platform Events – Event Based
6. Continuations (UI)

22. What is a Batch job in Salesforce?

Batch class is used to process millions of records with in normal processing limits.
With Batch Apex, we can process records asynchronously to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution. In Batch Apex each transaction
starts with a new set of governor limits, making it easier to ensure that your code
stays within the governor execution limits

23. What is the difference between the Stateful and Stateless batch jobs?

Using Stateful Batch Apex

If your batch process needs information that is shared across transactions, one
approach is to make the Batch Apex class itself stateful by implementing
the Stateful interface. This instructs Force.com to preserve the values of your static
and instance variables between transactions.

global class SummarizeAccountTotal implements Database.Batchable<sObject>,


Database.Stateful{
}
In Short, if you need to send a mail to check the number of records passed and
failed in the batch job counter, in that case, can you Stateful batch job?
If you want to create one counter and share/ use it in each execute method use the
same.

Using Stateless Batch Apex

Batch Apex is stateless by default. That means for each execution of


your execute method, you receive a fresh copy of your object. All fields of the class
are initialized, static and instance.

global class SummarizeAccountTotal implements Database.Batchable<sObject>{


}

24. What is mixed DML?

A Mixed DML operation error occurs when you try to persist in the same
transaction and change to a Setup Object and a non-Setup Object. For
example, if you try to update an Account record and a User record at the same time.

Salesforce Developer Lightning Interview Question and Answers

25. What is Lightning Data Service?

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 simplifying access to Salesforce
data, Lightning Data Service improves performance and user interface consistency

26. How to do communication between Lightning web components?

Use the Events in lightning web components (LWC) to communicate between


components. Events in Lightning web components are built on DOM Events, a
collection of APIs and objects available in every browser. Here we will be see how to
the events using the Custom-event interface and publish-subscribe utility.

Learn about Event in LWC in our Events in Lightning web components post. Events
are used in LWC for components communication. There are typically 3 approaches
for communication between the components using events.

1. Parent to Child Event communication in Lightning web component


2. Custom Event Communication in Lightning Web Component (Child to
Parent )
3. Publish Subscriber model in Lightning Web Component or LMS (Two
components which doesn’t have a direct relation )

27. How to call Apex class in Lightning web component and how many way we
have and when to use which option?
You can call the apex methods as functions into the component by calling either via
the wire service or imperatively. To call an Apex method, a Lightning web component
can:

 Wire a property
 Wire a function
 Call a method imperatively
To expose an Apex method to a Lightning web component, the method must be
static and either global or public. Annotate the method with @AuraEnabled

Learn more from the Call apex method from the Lightning web components post.

28. What are the basic difference between Application Event and Component
Event in Aura component?

Application Event Component Events

Application Events are handled by any


Component Events can be handled by
component have handler defined for
same component or a component that
event.These events are essentially a
instantiates or contains the component
traditional publish-subscribe model

The component events can only be


Application event can be used through out the
registered in child component and handled
application.
by parent component

We use attribute type="APPLICATION" in We use attribute type="COMPONENT" in


the aura:event tag for an application event. the aura:event tag for a component event.

29. What is a lightning messaging service?

Lightning Message Service (LMS) allows you to communicate between Visualforce


and Lightning Components (Aura and LWC both) on any Lightning page. LMS API
allow you to publish message throughout the lightning experience and subscribe to
the same message anywhere on lightning page.

Learn more here.

30. What is lazy loading in LWC and how do lazy loading in LWC?

Lazy loading is an optimization technique to load the content on demand. Instead of


loading the entire data and rendering it to the user in one go as in bulk loading, the
concept of lazy loading assists in loading only the required section and delays the
remaining, until it is needed by the user.

Learn how to use lazy load in the lightning web component here.

31. What are Design Attributes in Lightning Web Components?


We can use Design Attribute to make lightning web components attribute available to
System Admin to edit Lightning App Builder or Community. So we can expose the
component attribute in Lightning App Builder using design Attribute.

Learn more from Design attributes in Lightning Web Components post.

Salesforce Integration Interview Questions

Here is a list of the most frequently asked Salesforce Integration question in the
Developer Interview.

32. What is web services?

Web service is a standardized medium to propagate communication between the


client and server applications on the World Wide Web. Web services provide a
common platform that allows multiple applications built on various programming
languages to have the ability to communicate with each other.

Webservices is a functionality or code which helps to us to do integration. Web


services are open standard (XML, SOAP, HTTP, etc.) based web applications that
interact with other web applications for the purpose of exchanging data

33. What is the difference between SOAP and REST?

Here is difference between SOAP and REST API.

SOAP API REST API

Relies on REST architecture using


Relies on SOAP protocol
HTTP

Transports data in XML Transports data in JSON or XML

Highly structured/ typed Less structured? Less bulky data

Handles large data loads Works well with JavaScript

Designed with large enterprise application in


Designed with mobile devices in mind
mind

34. What is the difference between Enterprise WSDL and Partner WSDL?

Here is difference between Enterprise WDSL and Partner WDSL.

Enterprise WDSL Partner WSDL

Strongly Typed Loosely Typed


Tied to a specific configuration of
Useful for any configuration of Salesforce
Salesforce

Changes if custom field or custom Does not changes if custom field or custom
objects are added to your objects are added to an organization’
organization Salesforce configuration

35. Explain about Integration Patterns?

In salesforce we have welcome Integration patterns.

1. ” Remote Process Invocation—Request and Reply ” : Salesforce invokes a


process on a remote system, waits for completion of that process, and then
tracks state based on the response from the remote system.
2. ” Remote Process Invocation—Fire and Forget ” : Salesforce invokes a
process in a remote system but doesn’t wait for completion of the process.
Instead, the remote process receives and acknowledges the request and then
hands off control back to Salesforce.
3. ” Batch Data Synchronization ” : Data stored in Lightning Platform is created
or refreshed to reflect updates from an external system, and when changes
from Lightning Platform are sent to an external system. Updates in either
direction are done in a batch manner.
4. ” Remote Call-In ” : Data stored in Lightning Platform is created, retrieved,
updated, or deleted by a remote system.
5. ” UI Update Based on Data Changes ” : The Salesforce user interface must
be automatically updated as a result of changes to Salesforce data.
6. “Data Virtualization ” : Salesforce accesses external data in real time. This
removes the need to persist data in Salesforce and then reconcile the data
between Salesforce and the external system

Top Salesforce Integration Interview Questions

Basic Integration Questions

1. What is Integration?

Integration is a process of connecting two or more applications. Enterprise system


uses many applications, many or most of which are not designed to work with one
another out of the box. Each application can have data, business logic, presentation,
and security layers, all of which are possible targets for integration.

2. What is webservices?

Web service is a standardized medium to propagate communication between the


client and server applications on the World Wide Web. Web services provide a
common platform that allows multiple applications built on various programming
languages to have the ability to communicate with each other.
Webservices are functionality or code which helps us to do integration. Web services
are open standard (XML, SOAP, HTTP, etc.) based web applications that interact
with other web applications for the purpose of exchanging data.

Type of Web Service

There are mainly two types of web services.

 SOAP web services.


 RESTful web services

3. Difference between JSON Vs XML?

Here is some difference between JSON and XML. Check this post for more detail.

JSON XML

JavaScript Object
Notation has a type like Extensible markup language is type less, and should be
String, number, Object, string
Boolean

It is a way of representing It is a markup language and uses tag structure to represent


objects data items

Retrieving value is easy Retrieving value is difficult

It does not provide any


It supports namespaces.
support for namespaces.

It is less secured It is more secure than JSON

Guidelines: Key –
Enclosed in double Guidelines: Element – <lastname>hours</lastname>
Quotes(String) Value – Element Definition:
Can be any datatype {} – <xs:element name=”lastname” type=”xs:string”/> Attribute –
Object [] – Array , – <lastname lang=”EN”>Smith</lastname> Attribute Definition –
Separates data element <xs:attribute name=”lang” type=”xs:string”/>
within Object

4. What is REST API?

A REST API is also known as RESTful API. REST API is an application


programming interface (API) that conforms to the constraints of REST architectural
style and allows for interaction with RESTful web services.

RESTful API is an interface that two computer systems use to exchange information
securely over the internet. REST API has a lightweight request and response
framework. It is a simple, easy-to-use, and powerful web service based on RESTful
principles. REST API supports both XML and JSON. Rest resource is referenced
using URI, abstraction of information, and access using HTTP methods.

5. What is SOAP API?

SOAP is the Simple Object Access Protocol, a messaging standard defined by the
World Wide Web Consortium and its member editors. SOAP uses an XML data
format to declare its request and response messages, relying on XML Schema and
other technologies to enforce the structure of its payloads.

1. It uses a Web Services Description Language (WSDL) file to rigorously define


the parameters for accessing data through the API.
2. SOAP API supports XML only.
3. Because SOAP API uses the WSDL file as a formal contract between the API
and consumer, it’s great for writing server-to-server integrations.

6. What is the difference between SOAP and REST?

Here is the difference between SOAP and REST API.

SOAP API REST API

Relies on REST architecture using


Relies on SOAP protocol
HTTP

Transports data in XML Transports data in JSON or XML

Highly structured/ typed Less structured? Less bulky data

Handles large data loads Works well with JavaScript

Designed with large enterprise application in


Designed with mobile devices in mind
mind

Salesforce Integration Interview Questions

7. What all Integration options are available in Salesforce?

There are lots of Integration option are available in Salesforce. Some of the are
below.

Data
API Name Protocol Communication
Format

JSON,
REST API REST Synchronous
XML

SOAP API SOAP (WSDL) XML Synchronous


Chatter JSON, Synchronous (photos are processed
REST
REST API XML asynchronously)

Analytics JSON,
REST Synchronous
REST API XML

CSV,
It’s Asynchronous. Handle large data
Bulk API REST JSON,
loads with batching.
XML

Metadata Asynchronous. Retrieve, deploy, and


SOAP (WSDL) XML
API modify metadata.

Asynchronous. Push notifications from


Streaming Salesforce to subscribing
Bayeux JSON
API applications/entities
(replaces polling).

JSON,
Apex REST
REST XML, Synchronous
API
Custom

Apex SOAP
SOAP (WSDL) XML Synchronous
API

Build custom
development tools
Tooling API for Salesforce
platform
applications

8. What is WSDL?

WSDL (Web Services Description Language) is an XML document that describes a


web service. There are two types of WSDL in Salesforce:

 Enterprise WSDL
 Partner WSDL

9. What is the difference between Enterprise WSDL and Partner WSDL?

Here is the difference between Enterprise WDSL and Partner WDSL.

Enterprise WDSL Partner WSDL

Strongly Typed Loosely Typed

Tied to a specific configuration


Useful for any configuration of Salesforce
of Salesforce
Changes if custom field or Does not changes if custom field or custom
custom objects are added to objects are added to an organization’
your organization Salesforce configuration

Primarily for Customer Primarily for Partner

10. What is SoapUI? How to Use SoapUI to Test Salesforce WebService?

SOAP UI is a very popular API testing tool especially when we talk about SOAP
APIs. So, in this tutorial, we’re going to see how we can connect with Salesforce Org
using SOAP UI and we will call a standard salesforce soap API and have a look at
the response. Check below recording how to test Salesforce webservice using
SoapUI.

11. What are integration patterns in salesforce?

When you implement Salesforce, you frequently need to integrate it with other
applications. Although each integration scenario is unique, there are common
requirements and issues that developers must resolve.

12. Different types of Integration patterns available in Salesforce?

Check our blog post Salesforce integration Patterns & Best Practices to learn more.

Pattern Scenario

Remote Process Salesforce invokes a process on a remote system, waits for


Invocation—Request completion of that process, and then tracks state based on the
and Reply response from the remote system.

Salesforce invokes a process in a remote system but doesn’t


Remote Process
wait for completion of the process. Instead, the remote process
Invocation—Fire and
receives and acknowledges the request and then hands off
Forget
control back to Salesforce.

Data stored in Lightning Platform is created or refreshed to


Batch Data reflect updates from an external system, and when changes from
Synchronization Lightning Platform are sent to an external system. Updates in
either direction are done in a batch manner.

Data stored in Lightning Platform is created, retrieved, updated,


Remote Call-In
or deleted by a remote system.

UI Update Based on The Salesforce user interface must be automatically updated as


Data Changes a result of changes to Salesforce data.

Data Virtualization Salesforce accesses external data in real time. This removes the
need to persist data in Salesforce and then reconcile the data
between Salesforce and the external system.

13. What is remote site settings?

Remote site settings is used to authorize the endpoint and allow us to whom
integrate(end user)

Connected App And OAuth

14. What is a Connected App?

A connected app is a framework that enables an external application to integrate


with Salesforce using APIs and standard protocols, such as SAML, OAuth, and
OpenID Connect. Connected apps use these protocols to authenticate, authorize,
and provide single sign-on (SSO) for external apps. The external apps that are
integrated with Salesforce can run on the customer success platform, other
platforms, devices, or SaaS subscriptions.

15. What is OAuth?

OAuth is short for open authorization. OAuth 2.0 is a framework that allows for a
secure way for systems to establish trust with one another. The end goal is to obtain
an access token that can be used by to access protected resources without ever
providing your username or password to the other system.

16. What different OAuth2.0 Authorization flows are available in Salesforce?

You decide! Salesforce supports the following flows

1. SAML Bearer Assertion


2. JWT Bearer Token
3. Refresh Token
4. Web Server Authentication
5. Username-Password
6. User-Agent
7. Device Authentication
8. Asset Token
9. SAML Assertion

17. What is JWT flow in Salesforce?

Secure server-to-server integration without real time user involvement. Client


specifies user in a JSON web token (JWT) or SAML format XML assertion and
proves its own identity by appending a signature. JWT Bearer token flow is Ideal for
application which access sfdc only through API as there is no UI involved. For
example ETL tools or middleware.

JWT Structure

When we talk about JSON Web Token, it is consist of 3 parts

1. Headers – Which contains the algorithm which will be used to sign the
request {"alg":"RS256"}
2. Payload – This contains claims information which is an object containing
information about user and additional data. Claims are set using
parameters- {"Iss,aud,sub,exp"}
3. Signature – Signature consists of 3 parts and the structure is given below
<headerbase64encodedurl>.<claimsbase64encodedclaims>.<signature(uses
algorithm like RS 256)>

18. What is web service flow in Salesforce?

Allows apps with a secure client server (one which can protect a secret or private
key) to access protected resources. This flow is mainly used by applications
hosted on web server. If external application is trusted one and hosted on secure
server and can securely store client_secret, then flow can be used. This flow is used
mainly to build web application.

Learn more from Authorisation Code With Secret (Web Server flow).

19. What is Named Credential and what is its use of it?

A named credential specifies the URL of a callout endpoint and its required
authentication parameters in one definition. To simplify the setup of
authenticated callouts, specify a named credential as the callout endpoint.

20. What is OpenID Connect?

OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol. It allows
Clients to verify the identity of the End-User based on the authentication performed
by an Authorization Server, as well as to obtain basic profile information about the
End-User. Learn more here.

OpenID Connect Flow


21. Difference between OpenID and OAuth?

OAuth 2.0 OpenID Connect

Granting access to your API Logging the user in

Getting access to user data in other Making your accounts available in other
systems systems

This is primarily used for Authorization This is primarily used for Authentication

Streaming API and Events

22. What is Streaming API? Explain the different mechanisms of Steaming API.

Streaming API enables the streaming of events using push technology and provides
a subscription mechanism for receiving events in near real-time. The Streaming API
subscription mechanism supports multiple types of events, including PushTopic
events, generic events, platform events, and Change Data Capture events

Learn about terms used for Streaming API

Term Description

The creation, update, delete, or undelete of a record. Each event might


Event
trigger a notification.

A message in response to an event. The notification is sent to a


Notification
channel to which one or more clients are subscribed.

PushTopic A PushTopic triggers notifications for changes in Salesforce records


resulting from a create, update, delete, or undelete operation. A
PushTopic notification is based on the criteria that you specify in the
PushTopic record and the SOQL query that you define. Only the fields
specified in the query are included in the notification. The PushTopic
defines a subscription channel.

A stream of events to which a client can subscribe to receive event


Channel
notifications.

A conduit in which a publisher sends an event notification. Event


Event Bus subscribers subscribe to a channel in the event bus to receive event
notifications. The event bus supports replaying stored event messages

A Salesforce entity that represents the definition of the custom data that
Platform you send in a platform event message. You create a platform event and
Event define its fields in Salesforce. The subscription channel is based on the
platform event name.

Similar to a PushTopic, Change Data Capture triggers notifications for


changes in Salesforce records resulting from a create, update, delete,
or undelete operation. Unlike a PushTopic, Change Data Capture
Change Data
sends all changed fields of a record and doesn’t require you to specify
Capture Event
the fields in a query.
Also, Change Data Capture sends information about the change in
headers.

23. What is Change Data Capture?

Change Data Capture is a streaming product on the Lightning Platform that enables
you to efficiently integrate your Salesforce data with external systems. With Change
Data Capture, you can receive changes of Salesforce records in real-time and
synchronize corresponding records in an external data store. Change Data Capture
publishes events for changes in Salesforce records corresponding to create, update,
delete, and undelete operations.

24. What is Tooling API? Give one example of when you used it.

Use Tooling API to build custom development tools or apps for Lightning Platform
applications. Tooling API’s SOQL capabilities for many metadata types allow you to
retrieve smaller pieces of metadata. Smaller retrieves improve performance, which
makes Tooling API a better fit for developing interactive applications. Tooling API
provides SOAP and REST interfaces.

25. What is Salesforce Connect?

Salesforce Connect is a powerful App Cloud integration service, which enables users
of Salesforce applications to seamlessly access and handle data stored in external
sources, without leaving the Salesforce native environment. Instead of copying the
data into your org, you can use external objects to access the data in real time via
web service callouts.

When to use Salesforce Connect?

1. Display, Search, Modify Data stored in external System.


2. Don’t want duplicate data storage in Salesforce.
3. Small amount of data on real time
4. Access to latest data
5. Access like Salesforce Object

26. What is REST API Composite Resources

let us see what is composite resources. We have seen standard Salesforce rest
APIs which we use to create or update data in salesforce from an external system
these API‘s we do one at a time. Composite resources is an enhanced form of rest
API which executes a series of rest API requests in a single call. It helps you to do
multiple operations like read create update and delete Salesforce data in a single
callout

Integration Architect Interview Question

27. Difference Between API Gateway VS ESB?

28. What is API Gateway?

An API gateway is a management tool that sits at the edge of a system between a
consumer and a collection of backend services and acts as a single point of
entry for a defined group of APIs. The consumer can be an end-user application or
device, such as a single page web application or a mobile app, or another internal
system, or third-party application or system. Below diagram shows how an API
gateway often sits between the public internet and the demilitarized zone (DMZ) of a
private network.

29. What is the use of Middleware(App Glue) In Enterprise Context?


Here are 6 Fundamental Principles for Middleware in Enterprise Context:

1. Transnationality
2. Event handling
3. Queuing and buffering
4. Extract, transform, and load
5. Translation and transformation
6. Mediation routing

Salesforce Interview Questions on Triggers

1. What is Trigger in Salesforce?

Trigger is a procedure in database which automatically invokes whenever a special


events in Database occurs. Apex triggers enable you to perform custom actions
before or after events to records in Salesforce, such as insertions, updates, or
deletions

Apex Triggers

2. What are the two types of triggers in Salesforce?

There are two types of triggers in Salesforce.

 Before triggers are used to perform a task before a record is inserted or


updated or deleted in Salesforce. These are used to update or validate record
values before they are saved to the database.
 After triggers are used if we want to use the information set by Salesforce
system and to make changes in the other records. The records that fire
the after trigger are read-only.
3. What is the use of trigger class in Salesforce?

Use the Trigger class to access run-time context information in a trigger, such
as the type of trigger or the list of sObject records that the trigger operates on.

4. What are different events available in Triggers?

An Apex trigger is a set of the statement which can be executed on the following
events. We can add the below events with comma-separated. Here is a list of trigger
events in Salesforce.

Trigger Events

5. When we should use trigger or automation?

Use Salesforce flow for most of the automation in salesforce and use Apex Trigger
for complex logic which can’t be done using Flow.

6. Best practice and consideration for Trigger?

Here is a list of all apex trigger best practices that we should while creating the
trigger in Salesforce.

1. One Trigger Per Objec


2. Logic-less Triggers
3. Context-Specific Handler Method
4. Bulkify your Code
5. Avoid SOQL Queries or DML statements inside FOR Loops
6. Using Collections, Streamlining Queries, and Efficient For Loops
7. Querying Large Data Sets
8. Use @future Appropriately
9. Avoid Hardcoding IDs

7. How many times trigger execute on an Upsert event

Upsert trigger fires on 4 different events :- before(insert, update), after (insert,


update)

8. How many times trigger execute on an Merge event

Merge triggers are fired on both events on the delete.

9. Order of execution for Trigger

Check out our Order of execution in the Salesforce post on the same.

10. When you will choose before the event and when you will choose after the
event?

Use before the event to update the record which executes the Apex Trigger. Use
After the event to use related or child records.

11. What is the difference between Trigger.New and Trigger.newMap?

Trigger.New return the list of SObject which invoke the trigger. Trigger.newMap
return the Map of Id and SObject.

12. When we should use Trigger.Old?

It is always good and recommended to check the old and new values before making
any updates in Trigger. You can use Trigger.Old to check the old value of the record.
It can help you to stop recursion in Trigger.

13. How to void recursion in Trigger?

There are different way to stop the recursion in Trigger

1. Use Static Boolean Variable: Create a class with a static Boolean variable
with a default value of true.
o This is good for less than 200 records.
o If we update 200+ records then it will only process the first set of
records and skip the others.
2. Use Static Set to Store Record Id: Use static set in class to store all
processed record IDs.

14. How make callout from Trigger?


No, we cannot. The callout is an Asynchronous process whereas the Trigger is
Dynamic / Synchronous. Callouts would hold up the database transaction until the
callout is completed, which can be up to 120 seconds from a limited perspective.

But using @Future annotation we can convert the Trigger into an


Asynchronous Class and we can use a Callout method. Learn more about the future
method in Salesforce.

15. Can we call a batch job from Trigger?

Batch Apex can be invoked using an Apex trigger. But the trigger should not add
more batch jobs than the limit

16. What is the Trigger Handler pattern?

Please check this post to learn about Handler pattern and code. Let us talk about
what is the advantage of Trigger Handler Patter.

1. Apex Class that handles trigger logic


2. Allows code to be called from other code or tests
3. Uses specific Trigger contexts and Trigger variables for routing
4. Keep Triggers Simple
5. Allow for greater flexibility
6. Make code reusable
7. Unit tests are much easier

17. Have you used any trigger framework in Salesforce

Check out the apex hours Trigger Framework in the Salesforce session for the
same.

18. Difference between Validation rules and Triggers?

Validation rules are used to confirm that the data entered into a record meet various
data quality/business rules before letting the user save it. Triggers can be used for
various different things and can be executed at different times – e.g. when initiating a
new record, before saving it, or when a record is deleted. Validation rules are very
easy to create and virtually anyone can learn how to create these. Triggers are
more complex and generally require some development skills.

You might also like