The contribution of Salesforce in fulfilling the CRM needs of organizations is invaluable. Since long back, it has been a CRM global leader with its market share of 19.7%. As the growth of Salesforce is projected to be high, ultimately, the demand for skilled Salesforce professionals would also be high.

We have collected a bunch of Salesforce interview questions and Salesforce scenario-based interview questions that are sourced from Salesforce experts. I hope these questions would help you in cracking the Salesforce interview and landing in your dream job. If in case you have attended any Salesforce interview earlier and unable to find the same questions here, then feel free to comment on those questions in the comment section, and we will update them in this Salesforce interview questions blog so that it could help other students to learn from your experience.  Let's get into the QAs now.

Salesforce Fundamentals & Advanced Level Topics Interview Questions Include:

Declarative, Audit reporting features:- Includes salesforce platform questions, creating child records, custom objects creation, user interface design, Different page layouts, governor limits for the user, custom labels in Salesforce, web service in Salesforce, specific user declaration, creating dynamic dashboards & creating object relations in Salesforce.

Programmatic features:- Includes Salesforce developer platform questions, What is apex programming language, apex class creation with examples, what is bucket field, creating a VisualForce component, what is VisualForce page, few test methods of salesforce, what needs to be done when an error occurs, different data types, sharing rules for user-level access, Different apex transactions, How DML operations to be conducted on records.

Want to enhance your skills in dealing with the world's best CRM, enroll in our Salesforce Certification Training.

Salesforce Interview Questions and Answers

Q1) What does Salesforce do?

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

Q2) What are the Salesforce subsidiaries?

Ans: The following are the major subsidiaries of Salesforce:

  • Tableau 
  • Pardot
  • Heroku
  • Mulesoft
  • Demandware Inc
  • SalesforceIQ

Q3) What is meant by an Object in Salesforce?

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

[Related Article: "Trigger scenarios in Salesforce"]

Q4) What is meant by App in Salesforce?

Ans: 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 as 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.  

Q5) What type of apps we can create in SF?

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

Q6) What is Salesforce Standard Fields?

Ans: Below mentioned are the Salesforce Standard Fields

  • Owner,
  • Name,
  • Last modified by,
  • Created by.

Q7) What are Audit Fields?

Ans:  Standard fields are nothing but audit fields.

Q8) Which is the latest field you have worked in SF?

Ans: ‘Time’ is the latest field in Salesforce. 

Q9) What are the default filters in salesforce?

Ans:  They are “Date filters.”

Q10) How to get rid of Date Filter?

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

Q11) What are the issues you faced on joined reports?

Ans: We can not export.

Checkout Salesforce Tutorial

Q12) What are the types of reports that we have in Salesforce? 

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

  • The tabular report is those who 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 the detailed reports based on columns. 
  • Joined reports which are capable of allowing two or more reports in one report. 

Q13) What is an Audit trail? 

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

Q14) What are the benefits of using Salesforce CRM?

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

Q15) What is a profile? Can two users have the same profile?

Ans:  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 whoever works 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 works under is assigned with the same profile. Hence any number of people can have the same profile.

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

Q17) How many relationships do we have in Salesforce?

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

  • Master-detail relationship
  • Lookup relationship
  • External Lookup

Q18) What is the Master-Detail relationship?

Ans:  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 behaviour 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.

Q19) What is a “Lookup Relationship”?

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

Q20) What is External lookup?

Ans:   External lookup relationship is used to connect the child object to the parent object. The child object may be either custom, standard, or an 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. 

Q21) What is a self-relationship?

Ans:  It is a personal lookup 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.

Q22) What is workflow in Salesforce?  

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

[Related Page: What is cloud computing salesforce ]

Q23) What is meant by “Transfer record” in profile? 

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

Q24) Explain the Salesforce dashboard?

Ans: In Salesforce we use dashboards to represent the data in a pictorial format. Salesforce dashboard is capable of displaying 20 reports at a time.

Q25) What is SOAP?

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

Q26) What is a Time Trigger?

Ans:  Computer system executes one or more tasks according to the set of rules and scheduled tasks.

Q27) What is Trigger in Salesforce?  

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

Q28) What are the actions in the workflow? 

Ans:  Below mentioned are the actions in the workflow 

  • Field update 
  • Task
  • Outbound message 
  • Email alert 

Q29) What are the main things need to consider in the “Master-Detail Relationship”?

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

Q30) How many records can be shown in matrix, tabular & summary reports?

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

Q31) Is Roll-Up Summary field is only possible in Master-detail relationship?

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

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

Ans:  Maximum two MDR fields can be created in an object.

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

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

Q34) If we delete parent records in MDR, what happens to the child?

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

Q35) What about the undelete option?

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

Q36) How many Roll-Up Summary fields can be created in an Object?

Ans:  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).

Q37) If we reparent in the object will the parent update?

Ans: Yes, the parent will update the object.

Q38) How we can create an MDR on those objects where we already have records?


  1. First, we to create LR between the two objects.
  2. Connect all child records to parent.
  3. Convert the field type from LR to MDR.

Q39) How to look at the user license information in Salesforce Org?

Ans: Steps to find out the user license:

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

Q40) Can we delete a user in Salesforce?

Ans:  No, we cannot delete the user in the salesforce. 

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

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

Q42) Explain about object relationship overview?

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

Q43) How to create many to many relationships in Salesforce?

Ans:  It helps in creating a many-to-many relationship between two objects in Salesforce. Using many-to-many relationship 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.

relationships in Salesforce

Q44) What are the permission sets? 

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

Q45) What is sharing rule?

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

Q46) What are the default indexed fields in Salesforce? 

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

Q47) What is Fiscal year in Salesforce?

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

Salesforce Workflow

Q48) List some examples of custom fields?

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

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

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

Q50) What is the main difference between data table vs page block table tags?

Ans:  The differences between Data table and Page block

Page block:

  • It defines inside the pageblock station or pageblock
  • To design the visual pages it uses style sheets
  • The required attribute is “value”
  • Automatically it will display Column Headers


  • No need to mention inside the pageblock station or pageblock
  • No required value.
  • The data will be displayed using custom style sheets.
  • we need to specify column headers explicitly. 

Q51)What can cause data loss in Salesforce? 

Subscribe to our youtube channel to get new updates..!

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

Q52) What is the junction object and what is it used for? 

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

Q53) How does Salesforce track sales details?  

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

Q54) Is it possible to restrict access to data using sharing rules?

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

Q55) Can we schedule a dynamic dashboard in Salesforce? 

Ans:  No, we can not do that in Salesforce.

Q56) How many ways we can share a record?

Ans: Role Hierarchy :

If we add a user to a role, the user 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.

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

Ans: 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 success of bulk insert operation we will use database .insert.

Q58) Does the user can create insert their own custom logo while creating their own custom applications?

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

Q59) List things that can be customized on-page?

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

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

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

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

Ans: No either all or none.

Salesforce Apex Interview Questions

Salesforce Apex Beginner Interview Questions

Q62) What is Apex Interface?

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

Q63) Where can I use Apex?

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

Q64) How Does Apex Work?

Ans:  All Apex programs run entirely On-Demand on Platform.

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

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

Q65) What is Apex in Salesforce?

Ans:  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 record updates and VisualForce pages.

Q66) What are the ways to call the Apex class? 

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

Q67) Explain various methods of batch Apex class?

Ans: The Database Batchable contains three methods that must be implemented.

  1. Start method
  2. Execute method 
  3. Finish method 

Q68) What is Apex Email Service?

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

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

[Related Page: SalesForce Integration]

Q70) What is Map Class in Apex Salesforce?

Ans:  Map Class in Apex:

  • Map Class Contains methods for the Map collection type.
  • A Map is a collection of key values pairs where each unique keymap to a single value.
  • Map keys and values can be any data type primitive types, collections, objects, users 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’

Q71) What is Batch Apex in Salesforce?

Ans: 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 Number of subtasks where each subtask may contain the 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.

Salesforce Apex Intermediate Interview Questions

Q72) What is Apex Scheduler?

Ans:  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 they are

Public void execute(schedulablecontext sc)
Public class mySchedule implements schedulable
Public void execute(schedulablecontext sc)
Account a = new Account(Name = ‘Faraz’)
Insert a;

Q73) What is the Apex Trigger in Salesforce?

Ans: Trigger is an Apex Code that executes before or after. The following types of DML Operation:

  • Insert
  • Update
  • Delete
  • Merge
  • Upsert
  • Undelete

Q74) What is meant by Apex transaction?

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

Q75) What are The Types of Apex Triggers in Salesforce?

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

Q76) What is Apex Managed Sharing?

Ans: 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)

Multi-tenant Architecture

Q77) What is the Usage of the apex program within VisualForce page?

Ans:  When you want to call apex class in 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.

Q78) What is Sandbox in Salesforce?  

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

Q79) When do we use Sandbox?

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

Salesforce Apex Advanced Interview Questions

Q80) What is Multitenant Architecture in Salesforce?

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

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

Q82) List the data types that a Set can store?

Ans:  The Sets can store any of the following data types

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

Q83) What is a Visualforce component? 

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

Q84) What is SOQL?

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

Q85) What is the Bulkification best practice?

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

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

Ans:  Insert ListForBulkDML;

Q87) How can we perform DML partially?

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

Q88) What Are The Types of SOQL Statements in SalesForce?

Ans:  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 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);

Q89) What is the Syntax of SOQL Statement?

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

Q90) Explain briefly about GROUP BY with the syntax?

Ans:  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]

Q91) SOSL Statements In Salesforce Apex?

Ans: 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]);

Q92) Explain Javascript remoting for apex controllers?

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

Q93) How to add javascript remoting to a Visualforce page?

Ans:  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] );

Q94) Give some of Configuring javascript remoting requests?

Ans:  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.
Escap Boolean Whether to escape the apex methods response. The default is true.
Timeout Integer The timeout for the Static Resource request in milliSeconds. Default is 30000(30 seconds)

Q95) What is a Declarative Approach?

Ans:  Working on a project without code.

Q96) What is Customisation / non Declarative approach?

Ans:  Working on a project with code.

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


=: is the operator used to compare.

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


IN - keyword.

Q99) What 2 benefits we get by writing controllers?

Ans: We get Logic & Data.

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

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

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

Q102) How to call javascript using in VisualForce page?

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

Q103) 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 datatype We 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 DML operation on SQL query results. We cannot perform DML operations on search results.

Q104) What is Future Annotation(@Future)?

Ans: Use the future annotation to specify that these methods that 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

Q105) What is the AppExchange directory?

Ans: A web directory where hundreds of appexchange 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.

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

Ans:  We use

Q107) Which field cannot be added to a custom index?

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

Q109) What are some apex classes that are commonly used within?

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

Q110) What are the effects of using the transient keyword?

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

Q111) What is the maximum number of field dependencies we can use in the VisualForce page? 

Ans:  The maximum number of field dependencies we can use is a VisualForce page is 10.

Q112) What is the procedure to get the Security token in Salesforce?       

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

Q113) What is Metadata-driven development model?

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

Q114) What is S-Control?

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

Q115) What is wrapper class in Salesforce?  

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

Q116) What are force platform sites?

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

Q117) What is Tab in Salesforce?

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

  • Custom Tabs.
  • Visualforce Tabs.
  • Web Tabs.

Q118) What are the types of email templates that can be created in Salesforce?

Ans: The below mentioned are 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.

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

Q120) Is it possible to edit the VisualForce page in a production environment?

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

Q121) Is it possible to make changes to the apex trigger/apex class in production function?

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

Q122) What are the things that can be customized on page layouts?           

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

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

Ans: 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 what we are passing to the database.execute batch( ) method should be object of the class which has implemented database.batchable interface.

Q124) Will Visualforce still support the merge fields usage like S-control?

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

Salesforce Scenario Based Interview Questions

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

Ans:  This can be viewed in the Summary Report.

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

Ans: This can be viewed in the Matrix Report.

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

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

Q128) When two objects are connected with each other using r/s, then on secondary record the relationship will be shown using 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.

[Related Page: Field Dependency in Salesforce]

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

Ans:  It allows three custom levels per object.

(Eg: company → Workers → Sub workers.)

Q130) 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?

Ans:  This can be seen with Master-Detail Relationship.

Q131) 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?

Ans: This can be seen with LookUp Relationship.

Q132) Business Requirement - Assume there is 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.

Q133) Can John see records of Philip?

Ans: No, John cannot see the records of Philip.

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

Q134) Can John see records of Philip?

Ans:  Yes, now John can see the records of the Philip.

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

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

Q135) Can John edit records of Philip?

Ans:  Yes, John can edit the records of Philip.

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

Q136) Can John delete records of Philip?

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

Q137) In the above scenario can Stephen see the record of Celia or not?

Ans:  No.

Q138) Can Stephen see the record of Philip?

Ans: No.

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

Q139) Can Stephen see the record of Celia?

Ans: Yes.

Q140) Can Stephen delete the record Philip & Celia?

Ans:  No, he cannot delete anyone’s records.

Are you looking to get trained in Salesforce, we have the right course designed according to your needs. Our expert trainers help you gain the essential knowledge required for the latest industry needs. Join our Salesforce Certification Training program from your nearest city.

Mindmajix offers you a great way to showcase your level of skills and areas of expertise with industry level projects, and fast track your career with Salesforce Certifications.