Salesforce Interview Questions | Intermediate to Advance

Salesforce Developer Interview Questions, Salesforce Admin Interview Questions, Salesforce Interview Questions | Intermediate to Advance. Validation Rules Salesforce Interview Question


Salesforce Interview Questions

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

Related: Salesforce Apex Trigger Practice Questions 2022

Related: Best Top 10 Google Interview Questions

Related: Best Top 10 Microsoft Interview Questions

Related: Best Top 10 Amazon Interview Questions

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 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.

4. What is meant by App in Salesforce?

An App in 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.

Salesforce Interview Questions

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 report 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 the 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 through 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. 

Salesforce Interview Questions

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.

Salesforce Interview Questions

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.

8. 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. 

Salesforce Interview Questions

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 Permissions 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 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 they 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


  • 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. 

Salesforce Interview Questions

51. What can cause data loss in Salesforce? 

There are many things that can contribute to the 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.


  • 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.

Salesforce Interview Questions

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.

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 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 triggers 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.


  • 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 about 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.

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

Country(Key)‘United States‘Japan’France’‘England’‘India’
Currency (Value)‘Dollar’Yen’‘Euro’‘Pound’‘Rupee’

Salesforce Interview Questions

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 dividing them into a Number of subtasks where each subtask may contain records up to 4000.


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.

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.


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 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

80. What is Multitenant Architecture in Salesforce?

It is the cloud’s fundamental technology to share IT resources securely and cost-efficiently.

Salesforce Interview Questions

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.

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 that records from the 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)


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]


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]

Salesforce Interview Questions

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 ];


  • 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.


FIND ‘map*’ IN ALL FIELDS RETURNING account (Id, Name], Contact, Opportunity, Lead. In the 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.

BufferBooleanWhether to group requests executed close to each other in time into a single request. The default is true.
EscapBooleanWhether to escape the apex methods response. The default is true.
TimeoutIntegerThe timeout for the Static Resource request 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.

Salesforce Interview Questions

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 Language)SOSL (Salesforce Object Search Language)
Using SOQL we can Search only on one object one time.Using SOSL we can search on many objects at one time.
We can query on all fields of any datatypeWe can query only on fields whose data type is text, phone, and Email.
We can use SOQL in the Triggers and the classes.We cannot use Triggers but can in classes.
We can perform a DML operation on SQL query results.We cannot perform DML operations on 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.


global class class_name
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 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 operation on workflow
  • We cannot query from database


  • 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 related to that objects
  • 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 view state. This should be used for very temporary variables.

Salesforce Interview Questions

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 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.

Salesforce Interview Questions

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.


  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.

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.

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

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.

Salesforce Interview Questions

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.


Object: profit & loss.

Users: John & Philip


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?


138. Can Stephen see the record of Philip?


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

139. Can Stephen see the record of Celia?


140. Can Stephen delete the record Philip & Celia?

No, he cannot delete anyone’s records.

Important Interview Questions

Leave a Comment

two × five =