80+ Salesforce Interview Questions with Answers

  • Salesforce Interview Questions and Answers

Looking for Salesforce Interview questions with answers? We have got you covered. On this page, you will find 80+ Salesforce technical questions and answers that will give you confidence to face the interview. We hope you find these questions useful.

1. What are three ways for a developer to execute tests in an Org?

             Setup Menu, Tooling API, and Salesforce DX.

2. Which two settings must be defined in order to update a record of a junction object?

  • Read/Write access on the secondary relationship
  • Read/Write access on the primary relationship

3. What should be used to create a Scratch Org?

Salesforce CLI

4. Which Salesforce org has a complete duplicate copy of the production org including data and configuration?

Full Sandbox

5. A Salesforce Administrator is creating a record triggered flow. When certain criteria are met, the flow must call Apex method to execute a complex validation involving several types of Objects. Which annotation should a developer use to ensure the method can be used within the flow?


6. A developer creates an Apex Interface called Laptop.

Consider the following code snippet public

class SilverLaptop {



How can a developer use the Laptop Interface within the SilverLaptop class?

public class SilverLaptop Implements Laptop

7. Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

  • Import the static resource and provide JavaScript property for it.
  • Reference the property in the HTML template.
  • Upload the SVG as static resources.

8. As part of a data cleanup strategy, the company wants to proactively delete associated Opportunity records when a related Account is deleted. Which automation tool should be used to meet this business requirement?

Record-triggered flow.

9. A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use Data Loader instead of Data Import Wizard?

Data Import Wizard does not support Opportunities.

10. How many triggers we can define on an object?

We can write more than one trigger. But it is not recommended. The best practice is to use One trigger On One object.

11. Is Role mandatory in Salesforce?


12. Which org type do you use for building and testing Salesforce solutions?

Scratch Orgs.

13. How many fields will be created by default when we create an Object in Salesforce?


14. What is the suitable record Id available in Salesforce for Integration?

15-digit ID

15. How many Lookup relationships we can create on an object?


16. Which Cloud of Salesforce you will refer for Customer appreciation, retention, and reward system?

Loyalty Management.

Apex based Salesforce Interview Questions with Answers

17. What is Batch Apex?

Batch Apex is used for many records, data is divided into small batches of records, and then these batches will be executed. Batch class is generally used to process bulk records together so that we have a greater governor limit when compared to the synchronous code.

18. Name the methods to be implemented in Batch Apex?

The methods to be implemented in Batch Apex are as follows:

  1. Start method (used to collect chunks of data for processing)
  2. Execute method (used to perform operations on the collected data)
  3. Finish method (used for sending emails)

19. Can we call a batch class from a batch class? If yes, how?

Yes, we can call another batch class from the Finish method.

20. Can we make callouts from Batch Apex? If yes, how?

Yes, we must implement using the interface Database.AllowCallouts.

21. What are the limitations for Batch Apex?

  • Batch Apex jobs run slower when we use relationship subqueries in QueryLocator in the Start Method.
  • It is not possible to call future methods from the Batch Class.
  • Batch Apex creates one additional AsyncApexJob record for every 10,000 records of BatchApexWorker type, we must keep this in mind when we are querying the records.
  • Use Starttest and Stoptest methods around the Execute method.

22. What is the schedule Apex?

Schedule apex is used to execute an Apex code snippet at a specific period of time. To schedule an apex class, we need to implement a Schedulable interface.

23. How can we schedule a Batch Apex?

We can schedule a Batch Apex in two ways from user interface & programmatically using System.scheduleBatch method.

24. What is System.schedule()?

System.schedule() method is used to execute the schedulable interface.

System.schedule() method takes 3 parameters:

  1. Name of the job
  2. An expression that represents the time and date.
  3. The object of the class to be executed.

25. What is the return type of System.schedule()?

System.schedule() method returns Job ID.

26. Does Apex Scheduler run in system mode?

Yes, Apex Scheduler runs in system mode.

27. How to Lock the records which are queried through Apex?

Using the FOR UPDATE keyword, we can lock the rows fetched by SOQL query.

28. How to avoid nested iterations?

We can use map collections to avoid writing loop inside loop. This will decrease the execution time.

29. What is the twin field concept?

When Custom fields of two different Objects are editable and have the same API name and Data type, we call these fields as “twin fields”. Values pass from object A to object B when object B record is created.

30. What is a co-terminated subscription in Salesforce?

Co-terming in quotes means termination of contracts. Fields such as Contract Co-Termination(SBQQ__ContractCoTermination__c) determine how Salesforce CPQ co-terminates contracts for this customer.

Before you move with more Salesforce Interview Questions with Answers, take a look why Salesforce is a great career choice.

31. What is block pricing in Salesforce CPQ?

We can price a product based on quantity ranges. This is called block pricing.

32. What are bounded and unbounded queries in Salesforce?

  • Bounded Queries – Where we have a well-defined set of fields, for example, all standard fields.
  • Unbounded Queries – Where we have a set of fields that are not predetermined, for example, all fields or all custom fields.

33. What is asynchronous Apex? How many types of asynchronous Apex are there in Salesforce?

Asynchronous Apex is used to run processes in a separate thread when the resources are available for execution. There are four types of asynchronous operations available in Salesforce.

  • Future Methods
  • Batch Apex
  • Queueable
  • Scheduled Apex

34. Can we call a future method from another future method?

No, we cannot call a future method from another future method.

35. What are the best practices of writing Apex?

Following are the list of best practices of writing Apex:

  • Always bulkify the code for future reference.
  • Avoid SOQL queries inside the loop.
  • Don’t use hardcoded values, and try to use dynamic values.
  • Single trigger per single object.
  • Consider the order of execution while writing any code.

36. How many types of relationships are available in Salesforce?

There are different relationships available in Salesforce:

  • Master-Detail
  • Lookup Relationship
  • Self- Relationship
  • External lookup relationship
  • Many to Many relationship (Junction Object)
  • Hierarchical relationship

37. Can we create rollup summary fields in lookup relationships?

No, we cannot create rollup summaries in lookup relationships. It is possible to create rollup summaries only in master detail relationship.

38. How many fields can we add in a compact layout?

We can add up to a maximum of 10 fields in a compact layout.

39. How to call a class in process builder?

If we must call a class in a process builder, we have to declare that class with the annotation of @invocablemethod.

40. What are before and after triggers?

The triggers which run before the save of a record, we call them as before triggers and the triggers which run after saving the record are after triggers.

41. Can we bypass a validation rule?

Yes, we can bypass a validation rule to run for the records which are created newly instead of running for all the records.

42. What is the use of the test setup method?

We can use the test setup method to create some data for test class and we can use that data in any other method in test class.

43. What is test.starttest and test.stoptest?

Suppose if we want to run one method as asynchronous / have some long complex operations (which has multiple SOQL queries) then we will use test.starttest and test.stoptest to consider it as separate thread of execution to overcome the too many SOQL queries limit exception.

44. What is a dependent picklist?

If we want to control a picklist value based on selection of value in another picklist then we will use a dependent picklist.

45. What are the methods in batch Apex? 

There are three methods in batch Apex. They are:

  • Start
  • Execute
  • Finish

46. Can we write a batch Apex by excluding any one of the methods?

We cannot write a batch Apex without any of these methods. Since it’s an interface, we have to implement all the methods provided by the batch.

47. How many types of sharing rules do we have in Salesforce?

There are basically two types of sharing rules in Salesforce:

  • Owner- based sharing rules.
  • Criteria- based sharing rules.

48. What is the use of a change set, and what is the max size of a change set?

Change set is a Salesforce build in feature to move the changes from one sandbox to another sandbox, which are interconnected. At most, we can have 10,000 components in a change set.

49. How many records can we retrieve using a SOQL query?

Using SOQL, we can retrieve a maximum of 50,000 records at a time.

50. Can we revoke the access of a user using a permission set?

No, we can extend the levels of permissions of a user using permission set, but cannot revoke the permissions.

Advanced Salesforce Interview Questions with Answers

51. What is the difference between a custom controller and standard controller?

The standard controller is generated by Salesforce for all the objects. Whereas, a custom controller is defined by us with our custom logic using Apex.

52. What is the benefit of using custom metadata and custom labels?

By using custom metadata/ Custom Label, we can get the data stored in Custom metadata/ custom labels without writing any SOQL queries.

53. Can we use records of multiple objects in one UPSERT command?

No, we cannot.

54. What is multi-tenant architecture?

Whenever any platform shares resources with all customers, then this system is called multi-tenant architecture (MTA). Similar is the case with Salesforce Application.

55. What are the differences between SOQL and SOSL?

SOQL (Salesforce Object Query Language):

  • Using SOQL the user can make queries only on 1 object at a time.
  • The user can query fields of any data type.
  • The user can perform DML operations on query results.
  • Return type: List

SOSL (Salesforce object Search Language):

  • Using SOSL the user can make queries on many objects at an instance.
  • We can query only on fields having type Name, phone, or Email.
  • The user cannot perform DML operations on the search results.
  • Return type: List of list.

56. Why do we need 2 query languages in Salesforce?

SOQL is for “fetching” records based on some parameters/conditions.


get the records from the database where the country of customer = India

Here, Query has some conditions. We will not do any random table searches. Everything has to be clearly mentioned.

SOSL = for “searching” some information in the database.


If the user would like to write a code so that he/she can see records where the word “Andrew” is used in the database. (Has no connection to any criteria like the above)

Search queries will have a “text” to search.

57. What are the variations in Count ()?


Count(Field’s API Name)

Count_Distinct(Field’s API Name)


Count will display the result of all records while Count Distinct will display only distinct count. For example, a table has 5 records namely a,a,b,b,c then Count results in 5 while Count distinct results in 3.

58. What are Wild Characters / LIKE keywords and when are they used?

When we want to make a query on something which is not an exact value, like Name: “Andrew”, Tech : “Salesforce” etc., (these are exact values), and we only know the approx. format of it, in this case we can use the Wild characters.

This helps to find those records matching the xyz pattern.


We do not know that it’s “Salesforce” but we know it starts with “Sal” or ends with “ce”.

59. What are aggregate functions in SF?



SELECT MAX(Andy__Experience__c) FROM

Object __Name __c

60. Which function do we use to load data from .CSV and do testing?


61. What are the types of Approval Processes?

  • Jump Start Wizard
  • Standard Setup wizard

62. Out of all Approval Processes which one will you select and why?

Jump Start wizard:

  • This type is used to create a very simple Approval Process
  • This has very few steps
  • We get fewer options to configure
  • Not regularly used in real-time scenarios

Standard Setup wizard:

  • This is a commonly used Approval process
  • This has all features needed in the Approval Process
  • This has more steps compared to Jump Start Wizard
  • This will give us the right to configure the Approval Process in a detailed manner
  • This is used when there is a complex business scenario/requirement

63. What is the Outbound Message feature?

This is a feature by which we can connect from the Salesforce platform to other external platforms “without any code”. This works similar to Workflow rule action, i.e. it will work when any record is created/updated.

64. How can we check whether OBM is triggered or not?

We can check the status of the OBM from “Outbound Messages” in the setup.

65. What are Time Dependent actions in Salesforce?

There are some cases where we do not want to execute a particular action instantly, rather, we want the particular action to happen after viz. 1 hr, 10 hrs, 10 days, etc., In such a scenario we can achieve the solution by time-dependent actions in salesforce.

66. To what all entities can we create a Task?

User and Role.

67. Can we have a merge field in the Task email body?


68. What are the types of email templates we can create in Salesforce?

  • Text
  • HTML (using Letterhead)
  • Custom (without using Letterhead)
  • Visualforce

69. Difference between Public Group and Queue?


  • It is a group of users
  • We use this for transferring the ownership of records
  • We use Queue not to share the record with group of users, but to transfer the “responsibility” of that business entity (record) with them. (Ex: Object Deal__c)
  • We mostly use this concept with approval process as well as Lead object
  • In Lead object, we use this for load balancing, means, giving ownership of a lead record to a group of users.

Public Group:

  • This is a group of people we can add from any department (it’s not necessary that members of Public Group are from same department)
  • Helps to share records with large number of users in one click
  • Useful in Manual sharing / Sharing rule.
  • Once created, we can use Public Group for any object.

70. What is Sharing Rule and how many types of Sharing rules we have in Salesforce?

To share the records, based on some conditions, we use Sharing Rules (dynamic sharing). This is also called as Selective Sharing.

Types of Sharing Rules:

  • Owner based Sharing Rule
  • Criteria Based Sharing Rule
  • Guest user sharing (not commonly used)

Suggested Reading: Salesforce Certification FAQs

71. What are standard fields in Salesforce?

Owner, Name, Last Modified by, Created by

72. Counter Question for the above: then what are audit fields?

Owner, Name, Last Modified by, Created by.

73. What is group in Salesforce Chatter?

Whenever we have it make collaborative discussion between users, we can form a group.  Such two types of famous groups are present in Salesforce. They are Public and Private.

74. In which folder we can see reports of our Custom Object?

Other Reports

75. What is the default filter field in every Salesforce reports?

Date Filter.

76. Can we delete that default date filter in Salesforce reports?

No, we cannot.

77. What is Relationship in Salesforce?

Connecting different objects with each other to replicate a real-life scenario or business process is called as Relationship in Salesforce.

78. How we can connect objects in Salesforce?

We can connect objects by using Lookup Relationship or Master Detail Relationship, or Many to Many Relationship, or Hierarchical Relationship or with Self Relationship.

79. What is reparenting in Salesforce?

If we want to change the primary record in MDR, then we take the benefit of re-parenting feature else we can’t change Master/ Primary record.

80. On which object Hierarchy relationship works?

Only on User Object.

81. What are the different versions in Salesforce?

Salesforce offer 5 different versions: Developer, Essentials, Professional, Enterprise, Unlimited.

82. ALL ROWS query will give non-deleted records or deleted records or both?

Both. (*Note: That is why the name “ALL ROWS”.)

About Cloudely Inc. Salesforce Training Programs

Cloudely is a trusted Salesforce partner with a track record of successful implementations since 2013. We have launched Salesforce Training to help candidates get certified in Salesforce.

Cloudely Salesforce Training Solutions transform learners into competent Salesforce professionals. Our Umbrella of training solutions cater to the Salesforce career aspirations irrespective of their Salesforce expertise.

Students can also choose to enroll in dedicated programs for Salesforce Admin, Salesforce Developer, and Salesforce Lightning Web Components programs. Please connect with our Admissions team at salesforce@cloudely.com to know the individual program details including fee and training start date.

By |2023-04-20T08:15:54+05:30March 17th, 2023|Career Guidance, Salesforce|Comments Off on 80+ Salesforce Interview Questions with Answers