Top 50 Salesforce Interview Questions and Answers in 2022 | Edureka

As of Jan 2021, Salesforce is the world ’ sulfur leading CRM service supplier. They have more than 40 % market plowshare in the Cloud CRM space and dominates the overall CRM space with a commercialize share of 19.7 %. They were rated the global ’ s # 1 CRM for two consecutive years and if the project growth of Salesforce is anything to go by, the need for professionals with Salesforce training is lone going to exponentially increase. This is where Salesforce enters the painting, and that is what has prompted me to write a blog on the most frequently asked Salesforce interview questions with answers. Thanks to the cognition and wisdom shared by some of our experts from the industry, I have shortlisted this definitive list of the  Top 50 Salesforce interview questions which will help you prepare for the consultation. Hopefully this helps you land a ace caper in the sphere of your heat. In case you attended a any consultation recently, we urge you to post any question you have faced. Our experts will be happy to answer them for you .Top Trending Technologies. Want to Upskill yourself to get ahead in Career ? Check out the

Top 50 Salesforce Interview Questions And Answers

This list of interview questions is divided into 9 sections, each for different aspects of Salesforce .

  1. Salesforce fundamentals
  2. indicative features
  3. Audit & report features
  4. Data model and data management
  5. Logic & process automation
  6. Software testing
  7. Debug & deployment tools
  8. integration features
  9. Programmatic features

A. Salesforce Fundamentals – Basic Salesforce Interview Questions for Freshers

1. Can two users have the same profile? Can two profiles be assigned to the same user?

Profiles determine the level of access a drug user can have in a Salesforce org. a far as the first base separate of the question is concerned, Yes. One profile can be assigned to any number of users. Take the case of a Sales or Service team in a company. The entire team will be assigned the same profile. The admin can create one visibility : Sales Profile, which will have entree to the Leads, Opportunities, Campaigns, Contacts and other objects deemed necessary by the caller. In this manner, many users can be assigned the lapp visibility. In font the team lead or director need access to extra records/ objects then it can be done by assigning permission sets merely for those users. Answering the second separate of the doubt, each exploiter can only be assigned 1 profile .

2. What are Governor Limits in Salesforce?

In Salesforce, it is the Governor Limits which controls how much data or how many records you can store in the divided databases. Why ? Because Salesforce is based on the concept of multi-tenant architecture. In elementary words, Salesforce uses a single database to store the data of multiple clients/ customers. The below prototype will help you relate to this concept .

multi tenant architecture - salesforce interview questions

To make sure no individual customer monopolizes the share resources, Salesforce introduced the concept of Governor Limits which is strictly enforced by the Apex run-time engine. Governor Limits are a Salesforce developer ’ sulfur biggest challenge. That is because if the Apex code always exceeds the specify, the expected governor issues a run-time exception that can not be handled. Hence as a Salesforce developer, you have to be identical careful while developing your lotion. To learn more about it, enroll for Salesforce developer documentation today. Different Governor Limits in Salesforce are :

  • Per-Transaction Apex Limits
  • Platform Apex Limits
  • inactive Apex Limits
  • Size-Specific Apex Limits
  • assorted Apex Limits
  • Email Limits
  • Push Notification Limits

3. What is a sandbox org? What are the different types of sandboxes in Salesforce?

A sandbox is a transcript of the production environment/ org, used for testing and development purposes. It ’ s useful because it allows exploitation on Apex programming without disturbing the production environment. When can you use it ?
You can use it when you want to test a newly developed lotion or Visualforce page. You can develop and test it in the Sandbox org rather of doing it directly in product. This manner, you can develop the application without any hassle and then migrate the metadata and data ( if applicable ) to the production environment. Doing this in a non-production environment allows developers to freely test and experiment applications end to end. Types of Sandboxes are :

  • developer
  • Developer Pro
  • partial derivative copy
  • full

4. Can you edit an apex trigger/ apex class in production environment? Can you edit a Visualforce page in production environment?

No, it is not possible to edit apex classes and triggers immediately in production environment. It needs to be done first in Developer version or testing org or in Sandbox org. then, to deploy it in output, a user with Author Apex permission must deploy the triggers and classes using deployment tools. however, Visualforce pages can be created and edited in both sandbox and in output. only if the page has to do something unique ( unlike values ), it would have to be developed via Sandbox .

5. What are the different data types that a standard field record name can have?

A standard plain record diagnose can have data type of either auto number or text field with a limit of 80 chars. For generating car numbers, the format needs to be specified while defining the airfield and after that for every record that is added, the number will get car generated. For exercise : –
Sr No-{1}
Sr No-{2}
Sr No-{3}

6. Why are Visualforce pages served from a different domain?

Visualforce pages are served from a different domain to improve security standards and block crossbreed locate script. Take a look at the foreground share in the below Visualforce page : – sample visualforce page - salesforce interview questions

B. Declarative Features – Salesforce Interview Questions

7. What is WhoId and WhatId in activities?

WhoID refers to people. typically : contacts or leads. model : LeadID, ContactID WhatID refers to objects. example : AccountID, OpportunityID

8. What is the use of writing sharing rules? Can you use sharing rules to restrict data access?

Sharing rules are written to give edit access ( public read and write ) or public read only access to certain individuals in Salesforce org. A classic model is when : – only your managers or superiors need to be given extra credentials to your records in objects as compared to your peers. By default, all users in your organization will have organization-wide-default sharing settings of either Public Read Only or Private.
To give access to more records, which users do not own, we write sharing rules.
exemplar : partake rules are used to extend sharing access to users in public groups or roles. Hence, sharing rules are not arsenic stern as organization-wide default settings. They allow greater access for those users. adenine far as the second contribution of the wonder is concerned, the answer is no. We can not use sharing rules to restrict data access. It is alone used for allowing greater entree to records .

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

The different types of Email templates are listed in the below table : –

text All users can create or change this template
HTML with letterhead lone Administrators and users having “ Edit HTML Templates ” permissions can create this template based on a letterhead .
Custom HTML Administrators and users having “ Edit HTML Templates ” permissions can create this template without the necessitate of a letterhead
Visualforce merely administrators and developers can create this template. advance functionalities like merging data from multiple records is available entirely in this template

C. Audit & Reporting Features – Salesforce Interview Questions

10. What is a bucket field in reports?

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

11. What are dynamic dashboards? Can dynamic dashboards be scheduled?

Before we understand dynamic dashboards, let us inaugural understand static dashboards. static dashboards are the basic dashboard types that will be visible to any exploiter who has made a report out of his datum. An case of this is what a Sales manager/ Marketing coach would be able to see on his Salesforce org. In other words, a normal dashboard shows data only from a single user ’ mho position. now comes the concept of dynamic dashboards. Dynamic dashboards are used to display data which is tailored to a specific user. Let us consider the same example as above. In case the Sales director wants to view the report card generated specific to merely one of his team members, then he can use active dashboards. You can use dynamic dashboards when you want to show user-specific data of a detail drug user, such as their personal quotas and sales, or number of sheath closures, or leads converted etc.
You can besides use a normal/ static splashboard when you want to show regional or organization-wide data to a fructify of users, such as a especial region ’ s sales number, or a especial accompaniment team ’ s performance on casing closures. angstrom far as the second separate of the question is concerned, no we can not schedule a dynamic splashboard. That is because whenever we open the dashboard, it will show the data generated in real-time .

12. What are the different types of reports available in Salesforce ? Can we mass delete reports in Salesforce ?

Salesforce Report Types

1. Tabular reports dim-witted Excel type tables which provide a list of items with the august total
2. Summary reports alike to Tabular reports, but besides have functionality of grouping rows, viewing subtotals & creating charts
3. Matrix reports two-dimensional reports which allow you to group records both by row and column
4. Joined reports multiple blocks showing data from unlike reports based on same or different report types

Another important orient to note here is that, only drumhead reports and Matrix reports can be fed as data generator for dashboards. Tabular and Joined reports can not be used as data informant for dashboards. Can we mass delete reports in Salesforce ? Of Course we can mass delete reports in Salesforce. The option to mass delete reports can be found under Data Management in Setup .

D. Data Modelling & Data Management – Salesforce Interview Questions

13. What are the different types of object relations in salesforce? How can you create them?

No list of Salesforce interview questions is dispatch without involving relationships between objects in Salesforce. Relationships in Salesforce can be used to establish links between two or more objects. The different types of aim relationships in Salesforce are :

  1. Master-Detail Relationship (1:n)


    It is a parent-child relationship in which the master object controls the behavior of the dependent child object. It is a 1:n relationship, in which there can be only one parent, but many children.

    The main concept you need to be know is that, being the controlling object, the master field cannot be empty. If a record/ field in master object is deleted, the corresponding fields in the dependent object are also deleted. This is called a cascade delete. Dependent fields will inherit the owner, sharing and security settings from its master.

    You can define master-detail relationships between two custom-made objects, or between a custom aim and standard aim a long as the standard object is the master in the relationship .

  2. Lookup Relationship (1:n)


    Lookup relationships are used when you want to create a link between two objects, but without the dependency on the parent object. Similar to Master-Detail relationship, you can think of this as a form of parent-child relationship where there is only one parent, but many children i.e. 1:n relationship.

    The difference hera is that despite being controlling field, deleting a record will not result in automatic deletion of the search field in the child object. Thus the records in the child object will not be affected and there is no cascade delete here. Neither will the child fields inherit the owner, sharing or security settings of its parent.

  3. Junction Relationship (Many-To-Many):-

    This kind of a relationship can exist when there is a need to create two master-detail relationships. Two master-detail relationships can be created by linking 3 custom objects. Here, two objects will be master objects and the third object will be dependent on both the objects. In simpler words, it will be a child object for both the master objects.

14. What happens to detail record when a master record is deleted? What happens to child record when a parent record is deleted?

In a Master-Detail relationship, when a master record is deleted, the detail read is deleted automatically ( Cascade erase ). In a Lookup relationship, evening if the parent record is deleted, the child record will not be deleted .

15. Can you have a roll up drumhead plain in encase of Master-Detail relationship ?

Yes. You can have a roll-up compendious in case of a master-detail relationship. But not in case of a search relationship. A roll-up drumhead battlefield is used to display a rate in a overlord record based on the values of a set of fields in a detail record. The detail record must be related to the dominate through a master-detail relationship. There are 4 calculations that you can do using roll-up compendious playing field. You can count the number of detail records related to a master phonograph record. Or, you can calculate the sum, minimum value, or maximum value of a playing field in the detail records .

16. Explain the term “Data Skew” in Salesforce.

Data skew ” is a condition which you will encounter when working for a boastfully client where there are over 10,000 records. When one one drug user owns that many records we call that condition ‘ ownership data skew ’. When such users perform updates, operation issues will be encountered because of “ data skew ”. This happens when a single user/ members of a one character own most of the records for a particular object .

17. Explain skinny table. What are the considerations for Skinny Table?

In Salesforce, tight-fitting tables are used to access frequently used fields and to avoid joins. This largely improves performance. skinny tables are highly effective, so much so that even when the generator tables are modified, skinny tables will be in synchronize with source tables. Considerations for skinny tables :

  • skinny tables can contain a utmost of 100 columns .
  • skinny tables can not contain fields from other objects .
  • For wide sandboxes : tight-fitting tables are copied to your Full sandbox organizations, as of the Summer ’ 15 acquittance .

18. Which fields are automatically Indexed in Salesforce?

merely the follow fields are automatically indexed in Salesforce :

  • Primary keys

    (Id, Name and Owner fields).

  • Foreign keys

    (lookup or master-detail relationship fields).

  • Audit dates

    (such as SystemModStamp).

  • Custom fields

    marked as an External ID or a unique field.

19. How to handle comma within a field while uploading using Data Loader?

In a Data Loader .CSV, if there is a comma in field content, you will have to enclose the contents within double citation marks : ” “ .

E. Logic & Process Automation – Salesforce Interview Questions

20. For which criteria in workflow “time dependent workflow action” cannot be created?

Time dependent work flow action can not be create for : “ created, and every time it’s edited ” .

21. What are the types of custom settings in Salesforce? What is the advantage of using custom settings?

There are two types of custom-made settings in Salesforce : List Custom Settings and Hierarchy Custom Settings. list Custom Settings are a type of custom-made settings that provides a reclaimable plant of static data that can be accessed across your constitution regardless of user/ profile.
Hierarchy Custom Settings are another type of custom settings that uses built-in hierarchical logic for “ personalizing ” settings for specific profiles or users. The advantage of using customs settings is that it allows developers to create a custom-made set of access rules for versatile users and profiles .

22. How many active assignment rules can you have in a lead/ case?

only one principle can be active at a time .

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

Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values here can be translated into any speech supported by Salesforce.
Their benefit is that they enable developers to create multilingual applications which automatically presents information in a drug user ’ s native linguistic process. You can create up to 5,000 custom-made labels for your administration, and they can be up to 1,000 characters in length .

24. What is the difference between a Role and Profile in Salesforce?

As mentioned in one of the previous Salesforce interview questions, a profile will ultimately control access to which records a drug user has in a Salesforce org. No drug user can work on the Salesforce org without being assigned a profile. The Profile is therefore compulsory for every exploiter. Role however is not mandatary for every drug user. The elementary function of the Role/ Role hierarchy is that it allows higher level users in hierarchy get entree to records owned by lower level users in the hierarchy. An example of that is Sales Managers getting access to records owned by Sales Reps while their peers do not get access to it .

25. What are the examples of non-deterministic formula fields?

Before I mention some of the examples, let me give you an presentation to deterministic and non-deterministic formula fields. Formula fields whose value will be electrostatic are referred to as deterministic fields. Whereas, formula fields whose prize will be changed dynamically or whose values will have to be calculated on the fly, they are referred to as non-deterministic formula fields. A classic exercise of that is a rule returning the current date and time. Some examples of non-deterministic fields in are :

  • Lookup fields
  • Formula fields whose reference spans over early entities
  • Fields having dynamic date functions like : – today ( ) or NOW ( )

Want to upskill yourself to get ahead in your career ? Check out this video

top 10 Technologies to Learn in 2022 | Edureka

F. Software Testing – Salesforce Interview Questions

26. Why do we need to write test classes? How to identify if a class is a test class?

software developers from around the populace will unanimously agree that writing code in test classes makes debugging more efficient. Why ? That is because test classes help in creating robust and error-free code be it Apex or any other program language. Since unit tests are brawny in their own right, Salesforce requires you to write test classes in Apex code.
Why are they so powerful ? Because quiz classes and test methods verify whether a particular patch of code is working by rights or not. If that firearm of code fails, then developers/ testers can accurately locate the examination class having the faulty bug. test classes can be determined well because every test class will be annotated with @isTest keyword. In fact, if we do not annotate a screen class with @isTest, then it can not be defined as a trial class. similarly, any method acting within a course which has the keyword testMethod, is a test method acting .

27. What is minimum test coverage required for trigger to deploy?

In Salesforce, if you want to deploy your code to production, then you must make certain that at least 75% of your Apex code is covered by unit tests. And all these tests must complete successfully .

G. Debug & Deployment Tools – Salesforce Interview Questions

28. What are the different ways of deployment in Salesforce?

You can deploy code in Salesforce using :

  1. Change Sets
  2. eclipse with IDE
  3. Migration Tool – ANT/Java based
  4. Salesforce package

H. Integration – Salesforce Interview Questions

29. What is an external ID in Salesforce ? Which all sphere data types can be used as external IDs ?

An external ID is a custom field which can be used as a alone identifier in a record. external IDs are chiefly used while importing records/ data. When importing records, one among the many fields in those records need to be marked as an external ID ( unique identifier ). An important point to note is that only custom-made fields can be used as external IDs. The fields that can be marked as external IDs are : Text, Number, E-Mai fifty and Auto-Number .

30. How many callouts to external service can be made in a single Apex transaction?

Governor limits will restrict a one Apex transaction to make a maximum of 100 callouts to an HTTP request or an API call .

31. How can you expose an Apex class as a REST WebService in Salesforce?

You can expose your Apex class and methods thus that external applications can access your code and your lotion through the REST architecture. This is done by defining your Apex class with the @RestResource note to expose it as a REST resource. You can then use global classes and a WebService callback method. Invoking a custom Apex REST Web service method acting always uses system context. consequently, the stream drug user ’ randomness credentials are not used, and any drug user who has access to these methods can use their wide world power, careless of permissions, field-level security, or sharing rules.
Developers who expose methods using the Apex REST annotations should therefore take care that they are not unwittingly exposing any sensible data. Look at the below man of code for exemplify : –

global class AccountPlan {
 webservice String area; 
 webservice String region; 
 //Define an object in apex that is exposed in apex web service
 global class Plan {
 webservice String name;
 webservice Integer planNumber;
 webservice Date planningPeriod;
 webservice Id planId;
 webservice static Plan createAccountPlan(Plan vPlan) {
 //A plan maps to the Account object in 
 //So need to map the Plan class object to Account standard object
 Account acct = new Account();
 acct.Name =;
 acct.AccountNumber = String.valueOf(vPlan.planNumber);
 insert acct;
 return vPlan;
 } }

Find out our Salesforce Training Course in Top Cities

India United States Other Countries
Salesforce Training in Hyderabad Salesforce Training in Dallas Salesforce Training in Melbourne
Salesforce Training in Bangalore Salesforce Training in Charlotte Salesforce Training in London
Salesforce Training in Chennai Salesforce Training in NYC Salesforce Training in Sydney

I. Programmatic Features – Advanced Salesforce Interview Questions and Answers for Experienced Professionals

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

Standard accountant in Apex, inherits all the standard object properties and standard button functionality directly. It contains the same functionality and logic that are used for standard Salesforce pages. Custom accountant is an Apex class that implements all of the logic for a page without leveraging a standard accountant. Custom Controllers are associated with Visualforce pages through the restrainer attribute.

33. How can we implement pagination in Visualforce?

To control the number of records displayed on each page, we use pagination. By nonpayment, a list accountant returns 20 records on the foliate. To customize it, we can use a accountant propagation to set the pageSize. Take a look at the sample code below : –


34. How can you call a controller method from JavaScript?

To call a restrainer method ( Apex routine ) from JavaScript, you need to use actionfunction. look at the downstairs piece of code to understand how a restrainer method acting is called using actionfunction .


beginning :
Category : interview

We will be happy to hear your thoughts

Leave a reply

GauDay Crypto news and market tracking in real time
Enable registration in settings - general