Interview Questions.

Interview Questions for CRM Salesforce


Interview Questions for CRM Salesforce

Q1. Can two customers have the same profile? Can  profiles be assigned to the equal person?

Ans: Profiles determine the extent of get entry to a consumer may have in a Salesforce org.

As some distance because the first a part of the query is concerned, Yes. One profile can be assigned to any quantity of users. Take the instance of a Sales or Service group in a company. The whole team can be assigned the equal profile. The admin can create one profile: Sales Profile, as a way to have get right of entry to to the Leads, Opportunities, Campaigns, Contacts and other items deemed important by way of the enterprise.

In this manner, many users may be assigned the equal profile. In case the crew lead or manager want get entry to to extra information/ gadgets then it can be finished through assigning permission units handiest for those customers.

Answering the second one part of the query, every person can most effective be assigned 1 profile.

Q2. What are Governor Limits in Salesforce?

Ans: In Salesforce, it's far the Governor Limits which controls how tons facts or what number of records you may shop inside the shared databases. Why? Because Salesforce is based totally at the concept of multi-tenant architecture. In less complicated words, Salesforce makes use of a single database to store the facts of multiple customers/ clients. The under image will help you relate to this idea.

Multi tenant architecture - salesforce interview questions

To make sure no unmarried client monopolizes the shared assets, Salesforce delivered the concept of Governor Limits which is precisely enforced through the Apex run-time engine.

Governor Limits are a Salesforce developer’s biggest assignment. That is due to the fact if the Apex code ever exceeds the restrict, the predicted governor issues a run-time exception that can't be handled. Hence as a Salesforce developer, you need to be very careful while growing your software.

Different Governor Limits in Salesforce are:

Per-Transaction Apex Limits

Force.Com Platform Apex Limits

Static Apex Limits

Size-Specific Apex Limits

Miscellaneous Apex Limits

Email Limits

Push Notification Limits

Click Here for CRM Salesforce

Q3. What is a sandbox org? What are the unique types of sandboxes in Salesforce?

Ans: A sandbox is a duplicate of the manufacturing surroundings/ org, used for testing and improvement functions. It’s beneficial as it permits development on Apex programming without worrying the production surroundings.

When can you use it?

You can use it whilst you need to test a newly developed Force.Com application or Visualforce page. You can increase and take a look at it in the Sandbox org instead of doing it immediately in manufacturing.

This manner, you may expand the application without any problem after which migrate the metadata and records (if relevant) to the manufacturing surroundings. Doing this in a non-manufacturing surroundings allows developers to freely test and experiment applications quit to cease.

Types of Sandboxes are:


Developer Pro

Partial Copy


Q4. Can you edit an apex cause/ apex elegance in production environment? Can you edit a Visualforce web page in manufacturing surroundings?

Ans: No, it isn't always possible to edit apex classes and triggers directly in production environment.

It needs to be carried out first in Developer version or trying out org or in Sandbox org. Then, to set up it in production, a consumer with Author Apex permission have to installation the triggers and lessons the use of deployment equipment.

However, Visualforce pages can be created and edited in both sandbox and in manufacturing.

Only if the web page has to do something precise (unique values), it would have to be advanced via Sandbox.

Q5. What are the distinct statistics types that a widespread area report name can have?

Ans: A widespread subject file name can have statistics kind of both auto wide variety or text field with a restrict of eighty chars.

For producing vehicle numbers, the format desires to be unique whilst defining the sector and after that for each report this is introduced, the wide variety gets automobile generated. For example:-

Sr No-1

Sr No-2

Sr No-three

Q6. Why are Visualforce pages served from a exclusive domain?

Ans: Visualforce pages are served from a exclusive area to improve safety requirements and block go site scripting. Take a examine the highlighted component within the under Visualforce web page:-

sample visualforce web page - salesforce interview questions

Q7. What is WhoId and WhatId in sports?

Ans: WhoID refers to humans. Typically: contacts or leads. Example: LeadID, ContactID

WhatID refers to objects. Example: AccountID, OpportunityID

Q8. What is the use of writing sharing guidelines? Can you operate sharing rules to restrict statistics access?

Ans: Sharing guidelines are written to offer edit get admission to (public examine and write) or public study onlyaccess to positive people in Salesforce org. A traditional example is when:- only your managers or superiors need to receive more credentials for your facts in objects compared to your friends.

By default, all customers for your business enterprise can have organisation-wide-default sharing settings of both Public Read Only or Private.

To deliver get right of entry to to extra information, which users do now not very own, we write sharing rules.

Example: Sharing guidelines are used to extend sharing get admission to to users in public organizations or roles. Hence, sharing regulations are not as strict as corporation-extensive default settings. They allow greater get admission to for those customers.

As a ways as the second a part of the question is worried, the answer is no. We can not use sharing regulations to restriction statistics access. It is handiest used for permitting more get admission to to data.

Q9. What are the distinctive varieties of e mail templates that may be created in Salesforce?

Ans: The distinctive forms of Email templates are listed within the underneath desk:-

Text    All users can create or trade this template

HTML with letterhead    Only 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 want of a letterhead

Visualforce    Only administrators and builders can create this template. Advanced functionalities like merging statistics from more than one facts is to be had most effective in this template


C. Audit & Reporting Features – Salesforce Interview Questions

Q10. What is a bucket area in reviews?

Ans: A bucket field helps you to organization related information collectively by way of degrees and segments, without the usage of complicated formulation and custom fields. Bucketing can as a result be used to group, filter, orarrange record records. When you create a bucket area, you want to outline multiple classes (buckets) which might be used to institution document values.

The benefit is that in advance, we had to create custom fields to organization or section certain information.

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

Ans: Before we recognize dynamic dashboards, allow us to first apprehend static dashboards. Static dashboards are the fundamental dashboard kinds on the way to be seen to any user who has made a record out of his statistics. An example of that is what a Sales supervisor/ Marketing manager would be able to see on his Salesforce org. In different phrases, a normal dashboard shows information handiest from a single consumer’s perspective. Now comes the concept of dynamic dashboards.

Dynamic dashboards are used to display data which is adapted to a selected consumer. Let us take into account the same instance as above. In case the Sales manager wants to view the record generated unique to handiest one in every of his team participants, then he can use dynamic dashboards.

You can use dynamic dashboards whilst you need to show user-particular facts of a selected consumer, which includes their non-public quotas and income, or wide variety of case closures, or leads converted etc.

You can also use a everyday/ static dashboard when you need to expose regional or organisation-huge information to a set of customers, which include a particular area’s sales number, or a selected aid group’s overall performance on case closures.

As a long way as the second one part of the query is involved, no we cannot time table a dynamic dashboard. That is because whenever we open the dashboard, it'll show the records generated in real-time.

Q12. What are the unique sorts of reviews to be had in Salesforce? Can we mass delete reviews in Salesforce?


1. Tabular reviews    Simple Excel kind tables which offer a list of objects with the grand general

2. Summary reports    Similar to Tabular reports, but also have capability of grouping rows, viewing subtotals & creating charts

3. Matrix reports    Two-dimensional reviews which assist you to group statistics each via row and column

4. Joined reports    Multiple blocks displaying facts from extraordinary reports based totally on same or one-of-a-kind document kinds

Another critical factor to word right here is that, handiest Summary reviews and Matrix reviews may be fed as facts supply for dashboards. Tabular and Joined reviews cannot be used as statistics supply for dashboards.

Can we mass delete reviews in Salesforce? Of Course we can mass delete reports in Salesforce. The option to mass delete reports may be observed under Data Management inSetup.

D. Data Modelling & Data Management – Salesforce Interview Questions

Q13. What are the extraordinary types of item family members in salesforce? How can you create them?

Ans: No listing of Salesforce interview questions is entire without involving relationships among items in Salesforce. Relationships in Salesforce may be used to establish hyperlinks among  or more gadgets.

The special varieties of item relationships in Salesforce are:

Master-Detail Relationship (1:n):-

It is a figure-baby dating wherein the grasp object controls the conduct of the dependent toddler object. It is a 1:n relationship, wherein there may be most effective one figure, but many children.

The important concept you want to be realize is that, being the controlling item, the master subject cannot be empty. If a document/ field in grasp object is deleted, the corresponding fields in the dependent item are also deleted. This is called a cascade delete. Dependent fields will inherit the owner, sharing and security settings from its master.

You can outline grasp-detail relationships among  custom objects, or among a custom object and preferred item as long as the usual item is the master in the relationship.

Lookup Relationship (1:n):-

Lookup relationships are used while you want to create a hyperlink among two gadgets, but without the dependency on the determine item. Similar to Master-Detail courting, you could think about this as a shape of parent-child relationship wherein there is only one discern, however many children i.E. 1:n dating.

The difference here is that notwithstanding being controlling field, deleting a file will not bring about computerized deletion of the research area in the baby item. Thus the information in the baby object will now not be affected and there is no cascade delete here. Neither will the child fields inherit the owner, sharing or protection settings of its discern.

Junction Relationship (Many-To-Many):-

This type of a courting can exist whilst there's a need to create two master-element relationships. Two master-detail relationships can be created by way of linking 3 custom items. Here, two objects can be grasp gadgets and the 1/3 item may be depending on each the items. In less complicated phrases, it is going to be a child object for both the master objects.

Q14. What happens to detail document while a master record is deleted? What occurs to infant record while a figure record is deleted?

Ans: In a Master-Detail relationship, when a grasp file is deleted, the detail file is deleted routinely (Cascade delete).

In a Lookup courting, even though the determine report is deleted, the child report will not be deleted.

Q15. Can you've got a roll up precis discipline in case of Master-Detail relationship?

Ans: Yes. You could have a roll-up precis in case of a grasp-detail relationship. But not in case of a research relationship.

A roll-up precis field is used to show a fee in a master file based at the values of a hard and fast of fields in a element document. The detail report need to be related to the grasp through a grasp-detail courting.

There are 4 calculations that you could do using roll-up summary subject. You can rely the variety of detail information related to a master report. Or, you can calculate the sum, minimum value, or maximum price of a area inside the element information.

Q16. Explain the time period “Data Skew” in Salesforce.

Ans: “Data skew” is a situation which you may come across when running for a large client in which there are over 10,000 records. When one single person owns that many data we name that condition ‘possession records skew’.

When such customers perform updates, performance troubles may be encountered due to “statistics skew”. This takes place when a unmarried person/ members of a single function own maximum of the facts for a selected item.

Q17. Explain thin desk. What are the issues for Skinny Table?

Ans: In Salesforce, skinny tables are used to get right of entry to regularly used fields and to avoid joins. This in large part improves performance. Skinny tables are relatively powerful, a lot so that even if the supply tables are modified, thin tables may be in sync with supply tables.

Considerations for skinny tables:

Skinny tables can include a maximum of a hundred columns.

Skinny tables cannot incorporate fields from different objects.

For full sandboxes: Skinny tables are copied in your Full sandbox agencies, as of the Summer ’15 release.

Q18. Which fields are mechanically Indexed in Salesforce?

Ans: Only the subsequent fields are mechanically indexed in Salesforce:

Primary keys (Id, Name and Owner fields).

Foreign keys (research or grasp-detail courting fields).

Audit dates (inclusive of SystemModStamp).

Custom fields marked as an External ID or a completely unique area.

Q19. How to address comma inside a subject whilst importing the usage of Data Loader?

Ans: In a Data Loader .CSV, if there is a comma in field content, you may must enclose the contents inside double citation marks: ” “.

E. Logic & Process Automation – Salesforce Interview Questions

Q20. For which criteria in workflow “time structured workflow movement” can not be created?

Ans: Time based workflow action cannot be create for: “created, and whenever it’s edited”.21. What are the varieties of custom settings in Salesforce? What is the benefit of using custom settings?

There are  sorts of custom settings in Salesforce: List Custom Settings andHierarchy Custom Settings.

List Custom Settings are a sort of custom settings that provides a reusable set of static facts that may be accessed throughout your employer no matter consumer/ profile.

Hierarchy Custom Settings are some other type of custom settings that makes use of integrated hierarchical good judgment for “personalizing” settings for unique profiles or users.

The gain of using custom settings is that it lets in builders to create a custom set of access policies for diverse customers and profiles.

Q22. How many energetic task guidelines can you have in a lead/ case?

Ans: Only one rule may be lively at a time.

Q23. What are custom labels in Salesforce? What is the person restriction of custom label?

Ans: Custom labels are custom textual content values that may be accessed from Apex training or Visualforce pages. The values right here can be translated into any language supported through Salesforce.

Their advantage is they allow developers to create multilingual packages which robotically presents statistics in a consumer’s native language.

You can create up to five,000 custom labels in your corporation, and they can be up to at least one,000 characters in length.

Q24. What is the difference among a Role and Profile in Salesforce?

Ans: As referred to in one of the previous Salesforce interview questions, a profile will in the end manipulate get admission to to which information a person has in a Salesforce org. No user can work on the Salesforce org without being assigned a profile. The Profile is consequently mandatory for each consumer.

Role however isn't mandatory for every user. The number one feature of the Role/ Role hierarchy is that it allows higher level users in hierarchy get get admission to to information owned with the aid of lower stage users in the hierarchy. An instance of that is Sales Managers gaining access to data owned through Sales Reps even as their friends do now not get access to it.

Q25. What are the examples of non-deterministic Force.Com components fields?

Ans: Before I mention a number of the examples, allow me come up with an introduction to deterministic and non-deterministic formula fields. Formula fields whose value could be static are called deterministic fields. Whereas, formula fields whose fee may be changed dynamically or whose values will have to be calculated on the fly, they're known as non-deterministic system fields. A conventional instance of that could be a components returning the modern-day date and time.

Some examples of non-deterministic fields in Force.Com are:

Lookup fields

Formula fields whose reference spans over other entities

Fields having dynamic date features like:- TODAY() or NOW()

F. Software Testing – Salesforce Interview Questions

Q26. Why do we want to jot down test classes? How to become aware of if a category is a check magnificence?

Ans: Software developers from round the world will unanimously agree that writing code in check training makes debugging more efficient. Why? That is due to the fact take a look at classes assist in growing robust and blunders-free code be it Apex or some other programming language. Since Unit assessments are effective of their very own right, Salesforce calls for you to put in writing take a look at lessons in Apex code.

Why are they so effective? Because take a look at training and test strategies affirm whether a particular piece of code is operating nicely or not. If that piece of code fails, then builders/ testers can correctly discover the test class having the faulty computer virus.

Test classes may be decided easily because every test magnificence will be annotated with@isTest keyword. In truth, if we do not annotate a check class with @isTest, then it can not be defined as a take a look at elegance. Similarly, any method within a class which has the key-word testMethod, is a test method.

Q27. What is minimal check coverage required for cause to installation?

Ans: In Salesforce, in case you want to install your code to manufacturing, then you definitely must make certain that at least 75% of your Apex code is protected by using unit assessments. And these types of assessments should entire efficiently.

G. Debug & Deployment Tools – Salesforce Interview Questions

Q28. What are the unique ways of deployment in Salesforce?

Ans: You can set up code in Salesforce using:

Change Sets

Eclipse with Force.Com IDE

Force.Com Migration Tool – ANT/Java primarily based

Salesforce Package

H. Integration – Salesforce Interview Questions

Q29. What is an outside ID in Salesforce? Which all field information kinds can be used as external IDs?

Ans: An outside ID is a custom area which can be used as a completely unique identifier in a record. External IDs are particularly used at the same time as uploading facts/ facts. When importing data, one a few of the many fields in those records want to be marked as an external ID (specific identifier).

An vital factor to note is that most effective custom fields can be used as External IDs. The fields that may be marked as outside IDs are: Text, Number, E-Mail and Auto-Number.

Q30. How many callouts to external carrier may be made in a unmarried Apex transaction?

Ans: Governor limits will limit a single Apex transaction to make a most of 100 callouts to an HTTP request or an API call.

Q31. How can you reveal an Apex magnificence as a REST WebService in Salesforce?

Ans: You can divulge your Apex magnificence and strategies so that external packages can get right of entry to your code and your utility via the REST architecture. This is completed by way of defining your Apex magnificence with the @RestResource annotation to expose it as a REST aid. You can then use international training and a WebService callback technique.

Invoking a custom Apex REST Web carrier approach usually makes use of machine context. Consequently, the current consumer’s credentials are not used, and any person who has access to these techniques can use their complete strength, no matter permissions, field-stage protection, or sharing rules.

Developers who divulge strategies the usage of the Apex REST annotations need to therefore take care that they're no longer inadvertently exposing any touchy data. Look on the under piece of code as an example:-

international class AccountPlan 

  webservice String vicinity; 

  webservice String area; 

  //Define an object in apex this is exposed in apex net provider

  global magnificence 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 salesforce.Com. 

  //So want to map the Plan elegance object to Account preferred item

  Account acct = new Account();

  acct.Name = vPlan.Call;

  acct.AccountNumber = String.ValueOf(vPlan.PlanNumber);

  insert acct;


  go back vPlan;



I. Programmatic Features – Salesforce Interview Questions

Q32. What is the difference among a trendy controller and a custom controller?

Ans: Standard controller in Apex, inherits all the usual object houses and popular button functionality immediately. It consists of the same capability and good judgment which can be used for wellknown Salesforce pages.

Custom controller is an Apex class that implements all of the common sense for a page without leveraging a trendy controller. Custom Controllers are related to Visualforce pages thru the controller attribute.

Q33. How are we able to enforce pagination in Visualforce?

Ans: To manage the range of records displayed on every web page, we use pagination. By default, a list controller returns 20 facts at the web page. To customise it, we can use a controller extension to set the pageSize. Take a have a look at the pattern code underneath:-

<apex:page standardController="Account" recordSetvar="accounts">

  <apex:pageBlock title="Viewing Accounts">

  <apex:form id="theForm">

  <apex:pageBlockSection >

  <apex:dataList var="a" value="!Accounts" type="1">




  <apex:panelGrid columns="2">

  <apex:commandLink action="!Previous">Previous</apex:commandlink>

  <apex:commandLink action="!Next">Next</apex:commandlink>





Q34. How are you able to call a controller method from JavaScript?

Ans: To name a controller approach (Apex feature) from JavaScript, you want to useactionfunction.

Look at the below piece of code to apprehend how a controller approach is called the usage of actionfunction.

<apex: page>

<apex:form id ="frm">

<apex:actionfunction name="callfromJS" action="!ControllerMethodName reRender="frm"/>




feature JSmethodCallFromAnyAction()



Q35. How to get the UserID of all the currently logged in users using Apex code?

Ans: You can get the ID’s of all of the currently logged in customers by using the use of this global feature:UserInfo.GetUserId().

Q36. How many information can a select query go back? How many information can a SOSL question return?

Ans: The Governor Limits enforces the following:-

Maximum wide variety of records that can be retrieved by SOQL command: 50,000.

Maximum number of information that may be retrieved through SOSL command: 2,000.

Q37. What is an attribute tag? What is the syntax for along with them?

Ans: An characteristic tag is a definition of an characteristic of a custom issue and it could only be a toddler of a component tag.

Note that you can not define attributes with names like id or rendered. These attributes are automatically created for all custom thing definitions. The under piece of code suggests the syntax for along with them:


  <apex:attribute name="myValue" description="This is the value for the component." type="String" required="true"/>

  <apex:attribute name="borderColor" description="This is color for the border." type="String" required="true"/>


<h1 style="border:!BorderColor">

  <apex:outputText value="!MyValue"/>




Q38. What are the three kinds of bindings used in Visualforce? What does every confer with?

Ans: There are 3 sorts of bindings used in Salesforce:-

Data bindings, which check with the information set in the controller

Action bindings, which confer with movement techniques inside the controller

Component bindings, which talk over with other Visualforce components.

Data bindings and Action bindings are the maximum not unusual and they'll be utilized in every Visualforce web page.

Q39. What are the exceptional styles of collections in Apex? What are maps in Apex?

Ans: Collections are the type of variables which may be used to keep more than one wide variety of facts (facts).

It is beneficial because Governor Limits restriction the quantity of facts you could retrieve per transaction. Hence, collections can be used to save more than one facts in a unmarried variable defined as kind collection and with the aid of retrieving facts in the form of collections, Governor Limits will be in take a look at. Collections are just like how arrays paintings.

There are 3 series kinds in Salesforce:




Maps are used to store facts within the shape of key-cost pairs, where every specific key maps to a single value.

Syntax: Map<String, String> country_city = new Map<String, String>();

Q40. How are you able to embed a Visualflow in a Visualforce page?


Find the waft’s particular name.

From Setup, input Flows in the Quick Find field, then pick Flows.

Click the name of the drift.

Copy the unique call of the flow.

From Setup, input Visualforce Pages within the Quick Find field, then pick out Visualforce Pages.

Define a new Visualforce web page, or open an existing one.

Add the <flow:interview> issue somewhere among the <apex:page> tags.

Set the call attribute to the unique call of the flow.

For example


<flow:interview name="flowuniquename"/>


Click Save.

Restrict which users can access the Visualforce web page.

Click Visualforce Pages.

Click Security subsequent on your Visualforce page.

Move all the precise profiles from Available Profiles to Enabled Profiles via the usage of the ‘upload’ and ‘cast off’ buttons.

Click Save.

Add the Visualforce web page in your Force.Com app via the usage of a custom button, hyperlink, or Visualforce tab.

Q41. What is using “@future” annotation?

Ans: Future annotations are used to identify and execute methods asynchronously. If the technique is annotated with “@destiny”, then it'll be executed only when Salesforce has the to be had assets.

For instance, you may use it while making an asynchronous net carrier callout to an external service. Whereas with out using the annotation, the net service callout is made from the same thread this is executing the Apex code, and no extra processing will arise till that callout is complete (synchronous processing).

Q42. What are the distinct methods of batch Apex magnificence?

Ans: Database.Batchable interface includes three strategies that should be carried out:

Start technique:

global (Database.QueryLocator start(Database.BatchableContext bc) 

Execute method:

global void execute(Database.BatchableContext BC, list<P>)

Finish approach:

international void finish(Database.BatchableContext BC)

Q43. What is a Visualforce factor?

Ans: A Visualforce Component is either a predefined factor (popular from element library) or a custom component that determines the user interface behavior. For example, in case you need to send the textual content captured from the Visualforce web page to an object in Salesforce, you then want to utilize Visualforce additives. Example: <apex:detail>

Q44. What is Trigger.New?

Ans: Triger.New is a command which returns the list of data that have been brought lately to the sObjects. To be more specific, those information may be back which are yet to be stored to the database. Note that this sObject listing is best to be had in insert and replace triggers, and the statistics can handiest be modified in earlier than triggers.

But only for your information, Trigger.Old returns a listing of the old versions of the sObject facts. Note that this sObject list is simplest to be had in update and delete triggers.

Q45. What all facts types can a fixed shop?

Ans: Sets can have any of the following statistics types:

Primitive kinds



User-described sorts

Built-in Apex kinds

Q46. What is an sObject kind?

Ans: An sObject is any object that can be stored within the Force.Com platform database. Apex lets in the use of established sObject abstract type to represent any object.

For example, Vehicle is a established kind and Car, Motor Bike all are concrete sorts of Vehicle.

In SFDC, sObject is widespread and Account, Opportunity, CustomObject__c are its concrete type.

Q47. What is the difference between SOQL and SOSL?

Ans: The variations are cited inside the table underneath:

SOQL (Salesforce Object Query Language)    SOSL (Salesforce Object Search Language)

Only one item may be searched at a time    Many objects may be searched at a time

Can query any type of discipline    Can query handiest on electronic mail, textual content or phone

Can be utilized in classes and triggers    Can be utilized in classes, but no longer triggers

DML Operation can be finished on query consequences    DML Operation can not be performed on seek outcomes

Returns data    Returns fields

Q48. What is an Apex transaction?

Ans: An Apex transaction represents a set of operations which are executed as a single unit. The operations here include the DML operations which can be chargeable for querying statistics. All the DML operations in a transaction either entire successfully, or if an mistakes takes place even in saving a unmarried document, then the whole transaction is rolled lower back.

Q49. What is the difference between public and worldwide elegance in Apex?

Ans: Global elegance is on the market throughout the Salesforce instance irrespective of namespaces.

Whereas, public training are reachable handiest in the corresponding namespaces.

Q50. What are getter methods and setter techniques?

Ans: Get (getter) technique is used to bypass values from the controller to the VF web page.

Whereas, the set (setter) approach is used to set the cost lower back to controller variable.