Home / Salesforce

Salesforce Interview Questions

Rating: 5.0Blog-star
Views: 459236
by Vinod M
Last modified: July 16th 2021

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 your dream job. If in case you have attended any Salesforce interview earlier and are 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.

 

In This Salesforce CRM Interview Questions, You Will Learn

 

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 Training

 

Salesforce Interview Questions and Answers

1. What does Salesforce do?

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

2. What are the Salesforce subsidiaries?

The following are the major subsidiaries of Salesforce:

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

3. What is meant by an Object in Salesforce?

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

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

Custom Object: This includes the modifications made to 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 Salesforce.com is a container that holds various things such as a logo, name, and a set of required tabs.  It is also called a group of tabs that work together to prove the functionality that you are looking for.

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

The process to create an app in Salesforce:

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

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

For in-depth understanding read our Salesforce Tutorial blog

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.

MindMajix Youtube Channel Subscription

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

‘Time’ is the latest field in Salesforce. 

9. What are the default filters in salesforce?

They are “Date filters.”

10. How to get rid of Date Filter?

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

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

We can not export.

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

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

  • The tabular report is those that give us the total in a tabular format.
  • Matrix 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. 

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. 

 

For more details visit - Trigger Scenarios in Salesforce

 

28. What are the actions in the workflow? 

 Below mentioned are the actions in the workflow 

  • Field update 
  • Task
  • Outbound message 
  • Email alert 

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

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

Salesforce Intermediate Interview Questions

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

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

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

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

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

Maximum two MDR fields can be created in an object.

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

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

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

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

35. What about the undelete option?

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

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

Up to 40 can be created. (before 2010 it is 10 after 2016 it is up to 40 and it will change accordingly to salesforce updates).

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

Yes, the parent will update the object.

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

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

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

Steps to find out the user license:

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

40. Can we delete a user in Salesforce?

No, we cannot delete the user in the salesforce. 

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

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

42. Explain about object relationship overview?

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

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

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

salesforce many to many

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

salesforce workflow

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

DataTable:

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

51. What can cause data loss in Salesforce? 

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

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

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

Junction objects are mainly used to create a many-to-many relationship in Salesforce. If you consider a recruiting application as an example, you can find a position that is linked to many candidates, and in the same fashion, a candidate can apply for many positions. 

53. How does Salesforce track sales details?  

Salesforce gives the accurate results of following things such as 

  • Number of customers served on a daily basis 
  • Regular sales numbers 
  • Complete reports from the Sales Manager. 
  • Generates sales reports on a timely basis 
  • It provides the details of repeat customer activity.

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

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

55. Can we schedule a dynamic dashboard in Salesforce? 

No, we can not do that in Salesforce.

56. How many ways we can share a record?

Role Hierarchy :

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

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

OWD:

  • Defines the baseline setting for the organization.
  • Defines the level of access to the user can see the other user’s record

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

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

Manual Sharing :

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

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

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

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

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

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

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

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

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

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

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

No either all or none.

Salesforce Apex Interview Questions

Salesforce Apex Interview Questions and Answers

Salesforce Apex Beginner Interview Questions

62. What is Apex Interface?

The interface is a collection of unimplemented methods. This will specify the signature of the method, types of inputs that we pass the method specify what type is given as an output.

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

63. Where can I use Apex?

We can use Apex in the following ways

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

64. How Does Apex Work?

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

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

When the end-users 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.

Note:

  • Visualforce email templates cannot be used for mass emails.
  • We can associate each email service with one or more salesforce-generated email addresses to which the users can send messages for processing.

69. Explain 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]

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’

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.

Example:

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

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

 

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

 

Salesforce Apex Intermediate Interview Questions

72. What is Apex Scheduler?

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

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

Schedule Interface: The class that implements this interface can be scheduled to run at different intervals. This interface has several methods that are

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

73. What is the Apex Trigger in Salesforce?

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

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

74. What is meant by Apex transaction?

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

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

Triggers are divided into 2 types

  1. Before Triggers
  2. After Triggers

Before Triggers: Before Triggers can be used to update or validate values of a record before they are saved to the database.

After Triggers: After Triggers Before Triggers can be used to access field values of the records that are stored in the database and use this value to make changes in other records.

Syntax:

Trigger trigger_name on Object_Name(trigger_events) { Code_block } WHERE trigger_events can be comma separated list of events.

76. What is Apex Managed Sharing?

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

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

Multi Tenant Architecture

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

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

< Apex : page controller = “class name “ >

Whenever we call a VisualForce page in which the controller attribute is defined it will first create an object for the apex class which is defined in the controller. When an object is created for the apex class first it involves the constructor.

78. What is Sandbox in Salesforce?  

A Sandbox is defined as a testing environment that is used to test the code or to conduct experiments in an isolated environment without harming the production environment.

79. When do we use Sandbox?

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

Types of sandboxes available are :

  • Developer
  • Developer pro
  • Partial copy
  • Full

Salesforce Apex Advanced Interview Questions

80. What is Multitenant Architecture in Salesforce?

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

81. What are static resources? 

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

82. List the data types that a Set can store

The Sets can store any of the following data types

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

83. What is a Visualforce component? 

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

84. What is SOQL?

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

85. What is the Bulkification best practice?

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

  1. We need to use it for each loop whether we have 1 record or many.
  2. We must not use SOQL inside for loop.
  3. We must not use SOSL inside for loop.
  4. We must not use DML inside for loop.
  5. We need to store data in collections, so our code will work for single as well as multiple records.

Salesforce Apex Technical Interview Questions

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

Insert ListForBulkDML;

87. How can we perform DML partially?

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

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

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

There are 2 types of SOQL Statements:

  1. Static SOQL
  2. Dynamic SOQL

Static SOQL: 

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

These statements are similar to IINQ (Ion Integrated Query)

Example:

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

Dynamic SOQL:

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

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

Example 1:- Queries

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

Example 2:- Queries

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

89. What is the Syntax of SOQL Statement?

Syntax -

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

Example:-Queries

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

90. Explain briefly about GROUP BY with the syntax?

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

Syntax: [ GROUP BY field GROUP BY LIST]

91. SOSL Statements In Salesforce Apex?

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

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

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

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

Note:

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

Example:1

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

FIND {map*} IN ALL FIELDS RETURNING account  [Id,name], contact ,opportunity,lead;
From search list , you can create arrays for each object returned.
Account [ ]  accounts = (( list < accounts > ) search list [0] );
Contact [ ]  contacts = [( list ) search list [0]) ;
Opportunity [ ] opportunities = ((list < opportunity> ) search list [2]) ;
Lead [ ] leads = (( list < lead> ) search list [3]);

92. Explain Javascript remoting for apex controllers?

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

Javascript remoting has 3 parts.

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

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

To use javascript remoting in a Visualforce page, add the request as a javascript invocation with the following form:

Syntax -

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

94. Give some of Configuring javascript remoting requests?

Configure a remoting request by proving an object with configuration settings when you declare the remoting request.

JavaScript remoting supports the following configuration parameters.

Name Datatype Description
Buffer Boolean Whether to group requests executed close to each other in time into a single request. The default is true.
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)

95. What is a Declarative Approach?

Working on a project without code.

96. What is the Customisation / non Declarative approach?

Working on a project with code.

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

=: is the operator used to compare.

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

IN - keyword.

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

We get Logic & Data.

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

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

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

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

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

102. How to call javascript using in VisualForce page?

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

103. Difference between SOQL Vs SOSL in salesforce?

SOQL- (Salesforce Object Query 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 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.

Syntax:

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

105. What is the AppExchange directory?

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

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

We use <Apex:selectoption>

107. Which field cannot be added to a custom index?

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

108. What is the difference between trigger and workflow?

Workflow:

  • Workflow is an automated process that fired an action based on Evaluation criteria and rule criteria.
  • We can access a workflow across the object.
  • We cannot perform DML operation on workflow
  • We cannot query from database

Trigger:

  • A trigger is a piece of code that executes before or after a record is inserted or updated.
  • We can access the trigger across the object and 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.

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

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

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

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

113. What is a Metadata-driven development model?

 An app development model that allows apps to be defined as declarative “blueprints,” With no code required. Data model, objects, forms, workflows, and more are defined by metadata.

114. What is S-Control?

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

115. What is wrapper class in Salesforce?  

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

116. What are force platform sites?

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

117. What is Tab in Salesforce?

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

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

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

Below mentioned is the list of templates available in Salesforce :

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

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

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

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

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

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

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

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

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

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

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

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

Syntax:

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

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

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

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

Salesforce Scenario Based Interview Questions

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

This can be viewed in the Summary Report.

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

This can be viewed in the Matrix Report.

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

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

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

Lookup R/S:

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

[Related Page: Field Dependency in Salesforce]

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

It allows three custom levels per object.

(Eg: company → Workers → Sub workers.)

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

This can be seen with Master-Detail Relationship.

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

This can be seen with LookUp Relationship.

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

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

Description:

Object: profit & loss.

Users: John & Philip

Condition::

OWD: Private.

Profile of John: Finance profile.

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

Permission set of john: N/A

Role: N/A.

133. Can John see records of Philip?

No, John cannot see the records of Philip.

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

134. Can John see records of Philip?

Yes, now John can see the records of Philip.

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

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

135. Can John edit records of Philip?

Yes, John can edit the records, Philip.

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

136. Can John delete the records of Philip?

No, now John cannot delete the records of Philip.

Profile: Sales Profile.

Users: Stephen, Philip.

User in another profile: Celia.

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

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

No.

138. Can Stephen see the record of Philip?

No.

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

139. Can Stephen see the record of Celia?

Yes.

140. Can Stephen delete the record Philip & Celia?

No, he cannot delete anyone’s records.

Salesforce Admin Interview Questions

1) What is the Roll-up summary field?

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

2) Explain Queues?

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

3) Explain Escalation rules?

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

4) Explain Validation rules?

Validation Rules enable us to apply a particular logic rule to contribute to our organization’s data integrity. We can define the conditions on the object that are not available. For instance, if we do not want to label an opportunity as closed if the account does not have the address.

5) What are the primary components of the workflow?

Following are the primary components of the workflow:

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

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

6) Explain Time-dependent workflow?

We perform time-dependent actions at particular times before closing the record. Workflow re-evaluates the record after time passes. It checks whether the workflow rule criteria are satisfied, and only then workflow rule executes the actions.

7) What is the Workflow Task and Workflow Alert?

Workflow Task

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

Workflow Alert

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

8) Explain Auto-Response?

Auto-Response is about transmitting emails to leads or cases for particular record attributes and promptly responding to customer inquiries or issues by establishing the auto-response rule. At the same time, we can set one rule for a lead and one rule for a case.

9) Explain Custom Labels?

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

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

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

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

  • Criteria-based Sharing rules: Access is provided according to the record values and not according to the record owners. 
  • Owner-based Sharing Rule: These rules provide access to the records owned by the users.

11) What are Governor Limits?

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

  • Static Apex Limits
  • Per-transaction Apex Limits
  • Size-specific Apex Limit
  • Per-transaction Certified Managed Package Limits

12) Define the Approval process?

In Salesforce, the Approval process is a sequence of steps for approving records. An approval process is also helpful for tracking who and when approved or rejected something. It includes different approval models, notifying approvers, and conditional logic for who must support. 

13) What is the importance of Salesforce Chatter?

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

14) Explain Guest users?

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

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

15) Explain Change Set?

A changeSet is a group of components that we can migrate between the associated organisations (like from a sandbox to the production, sandbox to the sandbox, etc.).

Salesforce Developer Interview Questions

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

1) What is Apex test coverage? 

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

2) Explain Lightning Message Service(LMS)?

Lightning message service is a distinctive salesforce feature that allows interaction between Aura, Lightning Web Components, and Visualforce over the same lightning page. We can use the Lightning message service in Lightning Experience only.

3) Define OAuth?

OAuth is a standard for access delegation. Generally, we use it as a method for granting the applications or websites access to their data over other websites, yet without providing them with the passwords. 

4) Explain Connected App?

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

Besides OAuth capabilities, connected apps eagle salesforce admins to establish different security policies and possess external control to utilize similar apps.

Do you want to build an effective applications Salesforce, then join our Salesforce Developer Training to get a Flat 20% Off Course Fee

5) What is the Significance of Outbound Message?

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

6) What are the uses of External ID fields?

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

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

7) How can we create partial page refreshes?

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

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

By using the action provider, we can invoke the javascript controller action through a component markup

9) What are component and application events?

Application events

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

Component events

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

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

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

  • First: Display the first ten records.
  • Previous: Display previous ten records.
  • Next: Display the following ten records.
  • Last: Display the previous ten records.

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

Through StandardSetController
Through Offset and Limit keywords in SOQL Query

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

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

<apex:pageMessages></apex:pageMessages>

In Apex class, we must use:

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

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

Custom Objects Custom Settings
Custom Objects store the data in the database. Custom settings store the data in the Application Cache memory.
Custom objects have to use SQL queries for fetching the records from the database. Do not need to use SQL queries for fetching the records.
In custom objects, all data types exist. In Custom settings, only confined data types exist when compared to custom objects
On Custom objects, we can create apex triggers and validation rules. On List Custom settings, we cannot create apex triggers and validation rules
We can create a tab for custom objects. We cannot create a tab for custom settings

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

We cannot customize Apex in the production organization. We must change and deploy through a sandbox and satisfy test coverage requirements.

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

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

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

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

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

15) Explain Bucket Fields?

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

16) Differentiate isNull and isBlack?

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

17) How does Salesforce implement Sales Tracking?

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

18)  What is the limit of the Data.com records that we can add to Salesforce?

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

19) Explain the methods of the Batch Apex Class?

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

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

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

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

  • sObjects records list
  • Reference to the DatabaseBatcheable context.

20) What are the different types of Bindings?

Following are the different types of bindings:

  • Action Bindings: Action Bindings refers to action methods in the controller.
  • Data Bindings: Data Bindings refers to the data sets in the controller.
  • Component Bindings: Component Bindings refers to Visualforce components.

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

Yes, we use a getter method for returning the values for a controller. Each value computed by the controller and shown on the page should have a getter method.
 
On the other way, we use the setter method to pass the user-defined values from the page markup to the controller. In the controller, we execute the setter method automatically.

22) Explain Developer Console?

The developer console is an incorporated development tool that has a collection of tools. We use these tools for debugging, creating, and testing the applications in salesforce.org.

23) Explain packages and different kinds of packages?

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

  • Managed
  • Unmanaged

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

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

Following are the ways to implement metadata in the Salesforce:

  • By using Change Sets
  • Eclipse with Force.com IDE
  • Salesforce package
  • Through Migration tools

25) Explain reRender Attribute Tag?

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

26) How can we display the Chatter Feed Record?

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

Example:

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

27) Explain the Blob variable?

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

string string1='test string';
Blob blob1 = Blob.valueof(myString);
String String2 = myBlob.toString();
System.debug(String2);

28) What is the use of apex:outputLink?

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

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

 

Explore Salesforce Sample Resumes Download & Edit, Get Noticed by Top Employers!
 

About Author

author
NameVinod M
Author Bio

Vinod M is a Big data expert writer at Mindmajix and contributes in-depth articles on various Big Data Technologies. He also has experience in writing for Docker, Hadoop, Microservices, Commvault, and few BI tools. You can be in touch with him via LinkedIn and Twitter.