101 Most Important Frequently Asked Salesforce Interview Questions

To conclude our 16 Articles Series on Salesforce, here we are providing 101 Most Important Frequently Asked Salesforce Interview Questions. These questions will be very useful for you to crack an interview and help you to make a career in Salesforce.

We have divided questions in below 7 categories:

  1. Salesforce fundamentals
  2. Declarative features
  3. Data modeling and data management
  4. Logic & process automation
  5. Software testing
  6. Debug & deployment tool
  7. Programmatic features

Salesforce fundamentals :


Q.1  How users are differentiated in salesforce?

Ans:   Users are differentiated by creating their own individual profiles in salesforce. Each profile defines the level of access in salesforce organization for that user.

Q.2  How many profiles the one user can have in salesforce?

Ans:  The one user can have only one profile but multiple users can be of same profile. Ex. Consider the example of Support team, admin will create only one profile “Support Team” and that will be shared by all team members of support team.

Q.3  Which database architecture salesforce is based?

Ans: Salesforce is based on multi-tanant architecture. The single copy of database is shared with multiple users or client.

Q.4 What is Governer limit in sales force?

Ans: The salesforce applied limits to every user on data uses. These are known as Governer limits.

These are developed by suing Apex code. And strickly crossed verified by Apex run time engine.

Following are types of Governer limits

  • Per-Transaction Apex Limits
  • com Platform Apex Limits
  • Static Apex Limits
  • Size-Specific Apex Limits
  • Miscellaneous Apex Limits
  • Email Limits
  • Push Notification Limits
 Q.5 What is Sandbox?

Ans:  Sandbox is a copy  for production environment which is used  to test newly developed  visualforce pages or any Force.com application.

Q.6  What are different types of sandboxes in salesforce?

Ans: Types of Sandboxes are:

  • Developer
  • Developer Pro
  • Partial Copy
  • Full
Q.7. What is Salesforce?

Ans: Salesforce is  the Customer Relationship Management (CRM) product that is based on the terminology software-as-a-service (SaaS).

Q.8 . Explain custom object in Salesforce?

Ans:  The custom objects  are used to refer specifically to database tables that store data related to company in Salesforce.com.

Q.9 What are the functionality can be handled by Custom objects?

Ans:  The custom object can be used to create custom fields as well as it can relate the custom object to other records. Even one can track events and tasks. You can build page layouts, also you can create a custom tab for the custom object, dashboards and reports. Analyzing custom object data, create, and share custom tabs, custom apps, custom objects  becomes more simpler because of custom objects.

Q.10 Highlight various reasons to loss data in salesforce.

Ans:  Following are the few reasons to

  • Changing data and date-time
  • If you tried to migrate the number, currency or percent from other data types
  • Changing from multi-select picklist, checkbox, auto number to other types
  • If you alter the multi-select picklist from any type except picklist
  • Changing to auto-number except from text
  • Changing from text-area to e-mail, phone, URL, and text
Q.11 . List out relationships in Salesforce.com?

Ans: Salesforce supports two relationship types: Master-detail relationships and Lookup relationships.

Q.12. What is the trigger?

Ans: Trigger is the code which nearly acts with database and it is executed before or after the record is updated or inserted.

Q.13 What is Workflow?

Ans:  Workflow is an automated process which is used to validate evaluation criteria and rule criteria.

Q.14. Differentiate Trigger and Workflow?

Ans: Workflow is automatically get fired on an action based on evaluation criteria or rule while Trigger is not used for validation but it will get executed on or  after the record is inserted or updated.

Q.15. List out different object relations in Salesforce?

Ans: There are three types of object relations in Salesforce : One-to-many, Many-to-many and

Master-detail

Q.16. Is there a limit for data.com records?

Ans: Yes there is limit on data.com and the user can see their limit form setup. Go to setup and click on data.com administration/Users. Then select users section. Here in user section you can see monthly limit and  as well as how many records are exported during the month.

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

Ans:  The auto-number or text field with a limit of 80 chars are the two data types which standard field records can have.

Q.18 Is there any reason that visualforce pages are served from different domain?

Ans: The purpose to do this is to improve the block cross site scripting and security standards

Declarative Features:


Q.19. Differentiate WhoID and WhatId.

Ans: “WhoID” refers to people like contacts or leads.  Whereas “WhatId” refers to objects. Let us consider LeadID, ContactID are forms of “WhoId” and AccountID, OpportunityID are “WhatId”.

Q.20. Explain the use of writing sharing rules?

Ans: Using Sharing rules we can give an access to user or individuals. These access can be edit access (public read and write) or public read only access.

Q.21 Can we restrict data access using sharing rules?

Ans:  Sharing rules are used to extend the sharing access to users in public groups or role. It’s used only when you want to allow greater access to records. But we cannot restrict data access by sharing rule. If you are not using sharing rule the organization-wide-default sharing setting like Public read only or private will be used.

 Q.22. Explain various email templates that can be created in Salesforce?

Ans: Based on the user access Salesforce bifurcate email template in following :

Text All user can Create and Edit this template
HTML with letterhead Restricted to Administrators and/or 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. No need of a letterhead
Visualforce Only administrators and developers can create this template. The functionality of merging data from multiple records is supported in this template.

Audit & Reporting Features:


Q.23. Write a note on bucket field in reports?

Ans: A bucket field is group of related records. These groups are defined by users as per their requirement. The main purpose to define bucket field is to display co-related records or values in a group on the report. So in other word bucket field are used to filter, arrange or group the report data.

Q.24. What is static dashboard?

Ans: Static dashboards are the basic dashboard with fixed view (Single user perspective) and which is visible to any user who has made a report out of his data.

Q.25. Explain dynamic dashboards used in reports?

Ans: Dynamic dashboards in salesforce reports are used to display information which is for specific user. Let us consider an example of Team leader who want to view the information regarding his team members only in this case dynamic dashboard is used because it shows the user specific data on the same dashboard.

Some fields can be displayed using static dashboard like regional data or organization-wide data.

 Q.26. Can dynamic dashboards be scheduled?

Ans: Dynamic dashboard always show data integrated with real time so we can not scheduled dynamic dashboard.

Q.27. What are the different types of reports available in Salesforce?

Ans: Based on structural difference Salesforce has four different Types

Tabular reports This report displays data in the form of  Excel like tables which provide a list of items with the grand total
Summary reports The view is in table form only, but it has more  functionality like grouping rows (only), viewing subtotals & creating charts, grand total
Matrix reports It works for Two-dimensions and allow to group records row wise as well as column wise
Joined reports Combined report having multiple blocks showing data from different reports which may be of same or different report types

Q.28 Can we mass delete reports in Salesforce?

Ans: Yes we can mass delete reports in Salesforce. To mass delete reports, go to Setup -> Data Management.

Q.29 Can we use all report types as data source on dashboard?

Ans: No we can’t use all report type as data source for dashboard. Summary reports and Matrix reports are used as data source for dashboards while Tabular and Joined reports cannot be used as data source for dashboards.

Data Modeling & Data Management :


Q.30 List out all object relationships supported by salesforce.

Ans: Salesforce supports three object relations

Master-Detail Relationship (1:n)

Lookup Relationship (1:n)

Junction Relationship (Many-To-Many)

Q.31 Explain Master detail relationship in detail.

Ans: The parent child relationship in which parent (1 parent) is known as Master and child (n children) are controlled by this master object. If you delete master object all its dependent child object will get deleted. Remember that master object cannot be empty.

Q.32 Explain Lookup relationship in detail.

Ans: This is also 1:n relationship like master detail but has one difference that is child are independent of parent. That’s why deletion of parent will not automatically delete its child.

Q.33 Explain Junction relationship (Many to Many ) in detail.

Ans: The relationship is formed by connecting two master detail relationships by linking three objects. In this two objects will play role of master object and third object will be dependent on these two objects.

Q.34 What is mean by Cascade delete?

Ans: In master detail relationship when parent object is deleted then all its child objects get automatically deleted. This concept is known as cascade delete.

Q.35 What do you mean by “Roll-up summary field”. ?

Ans: The roll-up summary filed is used to display various calculations in master detail relationship. These calculations can be to count the number of records dependent on master field or to make sum of all values or find minimum or maximum.

Q.36 What is Data Skew in salesforce?

Ans: While working with the client who has records more than 10,000 or single user own more records then a condition occurs known as data skew, which generates the situation or condition known as data skew.

Q.37 What is skinny table?

Ans: Salesforce uses skinny table to store the frequently used fields. Because of skinny table it’s easy to access used fields and increase the performance. Skinny tables are sync with salesforce table do when it get modified skinny tables automatically get reflects.

Q.38 List out limitations of skinny tables.

Ans: Following are few limitations on skinny tables

  • Skinny table can have maximum 100 columns
  • It fails to contain fields from other table
  • We can copy skinny tables to Full sandbox organizations.
Q.39 List out the auto indexed fields in salesforce.

Ans: The fields which are declared as Primary key, Foreign key, custom fields which are ,marked as unique or an external ID are auto indexed.

Q.40 What is junction object in salesforce?

Ans: A junction object in salesforce is the custom object with two master detail relationships.

 Logic & Process Automation :


Q.41 What are advantages to use custom setting in salesforce?

Ans: The main advantage of custom setting in salesforce is  that developer can write custom setting rules as per user and profile.

Q.42 List out the types of custom settings in Salesforce?

Ans: List Custom Settings and Hierarchy Custom Settings are two types of custom settings.

Q.43 Differentiate the use of List custom settings and Hierarchy custom settings.

Ans: List custom settings provide static data which can be accessible by anyone i.e. irrespective of which user is accessing it. But in hierarchical custom settings the users personalized data is accessed only.

Q.44 Mention the criteria where “Time dependent action can not be created”.

Ans: created, and every time it’s edited”. For this criteria we can not create time dependent action.

Q.45 What is Custom label concept in Salesforce?

Ans: Custom text values which can be accessed from Ape classes as well as from any visualforce page are known as Custom labels.

Q.46 Highlight benefit of custom label in salesforce.

Ans: Custom labels can be fetch in any language supported by Salesforce platform. This gives flexibility to developer to create multilingual application which will automatically get translated to user’s native language.

Q.47 How many custom labels we can define and of what size?

Ans: Generally 5000 custom labels per organization can be created. The size of these labels can be 1000 character.

Q.48 Can we have multiple active assignment rules in lead?

Ans: No only one rule can be active at a time.

Q.49 What is non-deterministic Force.com formula fields?

Ans: The formula fields whose values is not static or not known and changed at runtime/ dynamically are non-deterministic Force.com formula fields.

Q.50 Give some example Non-deterministic formula fields

Ans:

  1. Fields having dynamic functions like TODAY(), NOW() from Date class.
  2. Lookup fields
  3. Formula fields who refers the values of other dynamic fields
Q.51 What is deterministic formula fields?

Ans:The formula fields whose value is static or known are called as deterministic fields.

Software Testing :


Q.52 How to identify the class is Test Class?

Ans: The test class is annotated by with@isTest keyword and the test method is annotated by test method keyword to identify them.

Q.53 Explain the need to write test classes?

Ans: Unit testing of code is an worldwide accepted method of verification and validation by developer. Test classes are written in apex and cab be used to test the code written in any language supported by salesforce.

Q.54 Are test classes powerful?

Ans: Test classes and methods verify every piece of code is working fine or not. If they find any bug then it is easy for developer to locate it using test class.

Q.55 Mention the percentile of minimum test cover for trigger to deploy.

Ans: To deploy code for production atleast 75% code should verified by unit testing for successful execution.

Debug & Deployment Tools :


Q.56 List out different ways of deployment in salesforce. Or List out different tools used for deployment in salesforce platform.

Ans: Following is the list of tools used in salesforce for deployment.

  1. Eclipse with Force.com IDE
  2. com Migration Tool – ANT/Java based
  3. Salesforce Package
  4. Change Sets
  5. Integration
Q.57 Explain External ID in salesforce?

Ans: A custom field which is used as unique identifier for the record is known as External ID. These ID’s are useful while importing records. Only custom field can be used as external ID’s.

Q.58 List out the data types which can be used for defining External ID’s.

Ans: Auto-Number, Text, Number, and E-Mail these data types can be used to define external ID’s.

Q.59 Is there any restriction on number of callouts for External service in Apex transaction?

Ans: Yes we can make 100 external service callouts only for single Apex transaction.

Q.60 Can we expose apex class as Restful webservice?

Ans: Yes we can expose apex class to Restful webservice by defining @RestResource annotation. But if you want to invoke custom Apex REST Web service method always uses system context.

Programmatic Features :


 Q.61 What is standard controller and custom controller?

Ans: The controller in apex which inherits all standard objects and its logic as it is known as standard controller. Where as the custom controller in salesforce is implemented without using any standard object.

Q.62 How many records can be return by SOQL and SOSL

Ans: SOQL commands can retrives 20000 records while SOSL command can retrives 2000 records .

Q.63 List out various bindings supported by visual force.

Ans: Visualforce supports three types of bindings

  • Data bindings : this binding refers to data set in the controller
  • Action bindings : action methods in the controller are referred here
  • Component bindings, which binds components with other Visualforce components.
Q. 64 What is collections in Apex?

Ans: Collections are variables which actually stores multiple data records. As there is limitation on number of records to be retrieve per transaction we can use collection variable to retrieve records.

Q.65 List out different types of collections supported by salesforce.

Ans: There are three types of collections supported by  salesforce

  1. List
  2. Maps
  3. Sets
Q.66 What is @future in salesforce

Ans: @future annotation denotes that the block will be executed when required resources are available. @future annotation is used to execute methods asynchronously.

Q.67 Can we write getter and setter methods in salesforce?

Ans: Yes, we can write getter method to get value of variable to VF page and setter method to set the value to the variable.

Q.68 Is there any difference between public class and global class?

Ans: Yes we can access global class anywhere irrespective of namespace also but public class is accessible within namespace only.

Q.69 Highlight Apex transactions.

Ans: An apex transaction is a collection of operations which executes together synchronously or as a single unit.  The transaction will get reflected if all operations from set executed successfully if any one fial then all will get rollback.

Q.70 Can we perform DML operation on SOQL and SOSL.

Ans : We can perform DML operations with SOQL but not with SOSL.

Q.71 What form of data the SOQL and SOSL returns?

Ans: SOQL returns record while SOSL returns field.

Q.72 What are restrictions while writing query with SOSL?

Ans: SOSL can query on Email, Phone and Text while SOQL can query with any field type.

Q.73 List out different data types Set can used.

Ans: Set can be of primitive type, user defined type, it can be collections, build in apex as well as SObjects.

Q.74 What is SObjetcs?

Ans :A generic abstract type object which is stored in Force.com database and can be used to represent any object is known as SObject.

Ex. SObject is generic type and opportunity, Lead, Accounts etc are its concrete type.

Q.75 What is Parameterized type?

Ans: As apex supports static data type concept, the type of variable should be known at the time of declaration. Collection, Sets, Maps declare their data type by passing parameters that is the parameterized type.

e.g. List<String> m_list = new List<String>();

Q.76 What is Email services heap size?

Ans : The email services heap size 36MB.

Q.77 How many email can be send per method?

Ans: Total 10 email can be send per method.

Q.78 How to count the number of SOQL statement received in a request?

Ans : This can be done using following methods

  1. Database.countQuery
  2. Database.getQueryLocator
  3. Database.query
Q.79 What is use of ApexPages Namespace?

Ans : The Apex Pages Namespace provides classes used in visualforce controller.

 Q.80 Explain the use of App Launcher Namespace.

Ans: App Launcher has methods which will take care of appearance of app the visibility and order.

Q.81 Give the syntax to insert operation.

Ans: The inster statement will help you to add one or more sObjects in to organizational data using following sysntax:

insert sObject   or insert sObject[]

Q.82 Give the use and syntax to use upsert operation.

Ans: The upsert statement will creates new records and it will also updates sObject records within a single statement. It take field name as parameter.

upsert sObject[field] or upsert sObject[] [field]

Q.83 Explain how does upsert operation works

Ans: Upsert initially uses sObjects record primary key to decide where it should create new record or update the earlier one.

Q.84 Explain the use of DML merge operation.

Ans: The merge operation is helpful to merge upto three sObjects of similar type. In this merge it will delete the remaining two and will maintain only merged data.

Syntax :

merge sObject sObject

merge sObject sObject[]

merge sObject ID

merge sObject ID[]

eg: merge  main_account my_acc

here the first parameter is the master record in to which other records are going to merge.

Q.85 What is TxnSecurity Namespace in salesforce?

Ans:  TaxSecurity namespace has two interfaces which take care of transaction security in

salesforce. It mainly include following  interface and class.

  1. PolicyCondition interface: this allows the class implementing it to specify actions for certain events occur to perform transaction security as per policy.
  2. Event Class : It has collection of all events that can be used by PolicyCondifition interface.
Q.86  Explain the syntax and use of  PolicyCondition. Evaluate method.

Ans: The main purpose of the evaluate method is to evaluate the an event against transaction secutrity policy.  Following is the signature for this method

public Boolean evaluate(TxnSecurity.Event event)

Based on evalution result it will either return true or false.

Q.87 What are the different PolicyConditions can be covered in the salesforce.

Ans: Following are few scenarios that PoilcyConditions to be determined for transaction security

  1. Block Local host Login
  2. Block Large Data Export
  3. High-Assurance Session
  4. Restricting Platform Browser
  5. Block Access by Geography
  6. Block Access by OS
  7. Block Specific Words in Chatter Posts
  8. Using Apex API Callouts
  9. Block Connected App Access
Q.88 How does Apex handles security and sharing?

Ans: Apex gives flexible user interface to add security level user permissions to share your code.To do this apex enforce sharing rule as well as it also enforce object and field permissions.

Q.89 How to get the number of records in picklist?

Ans: Use the DynamicPickListRows.size() to get the number of records in picklist.

Q.90 List out different methods of DynamicPickList class.

Ans: The following are methods for DynamicPickList.

clone() : this will generate duplicate copy for DynamicPickList object.

getDefaultValue (): Returns the picklist with default value for the picklist.

getLabel(attributeValue):Returns user-facing label for a specified picklist value.

getValues():Returns the list of picklist item with values.

isValid(attributeValue) :Returns the boolean valid state of the picklist item’s value

 Q.91 What is the purpose of Auth namespace?

Ans: The Auth namespace has an interface and classes which allows single sign-on into Salesforce. This also support session security management.

 Q.92 List out different exceptions supported by AuthExecption class

Ans: Following exceptions are supported by AuthException class

  1. VerificationException : throw exception for trigger verification based on the passed-in policy
  2. JWTBearerTokenExchange. JWTBearerTokenExchangeException : this exception can be thrown to indicate the problem with response
  3. ConnectedAppPlugin Exception : use if error occurs while running the connected app.
  4. AuthProviderPluginException : use if error occurs on app provided plugin
 Q.93 What is MAX_TTL_SECS?

Ans: The MAX_TTL_SECS is the constant to be set which determines the time-to-live for the session.

Q.94 What is Visibility Enum?

Ans: The visibility enumeration indicates that whether a cached value is visible only in the value’s namespace or in all namespaces by settein the values to ALL or NAMESPACE.

Q.95 When the InvalidCasheBuilder Exception will be raise?

Ans: This exception will be raised only when the CB parameter passed to get(CacheBuilder cb, String key), removed(CacheBuilder cb, String key) or validateCashebuilder(CacheBuilder cb) is not implemented. That means that CB is not valid cashe.

Q.96 What is JWS class?

Ans: JWS data structure  is used to apply a digital signature to a JSON Web Token.

The Signed JWT bearer token created by JWS class can be used to request an OAuth access token in the OAuth 2.0 JWT bearer token flow.

Q.97 What is use of  getCompactSerialization() of JWS classs?

Ans: This method returns the compact serialized data of the JWS in the concatenated string. This string contains the encoded JWS header, encoded JWS payload, and encoded JWS signature strings. All these items are separated by period (‘.’) characters.

 Q.98 What is Partition class?

Ans: Partition class is an Base class of Cache.OrgPartition and Cache.SessionPartition. The subclasses are used to partition the Orgnization and Session.

Q.99 What is Wave namespace?

Ans: The Wave Analytics SDK classes are used in the Wave namespace to  facilitate

quering Wave data from Apex code. It has QueryBuilder Class, QueryNode Class

         and ProjectionNode classes.

Q.100 List out different methods of ProjectionNode class.

Ans: The basic purpose of this class is to add aggregate functions to query.

Following is the list of methods of this class:

min()  : Returns the minimum value of a field.

max()  : Returns the maximum value of a field.

sum (): returns sum of a numeric field.

avg()   :Returns the average value of a numeric field.

count() : Returns the number of rows that match the query criteria.

unique(): Returns the count of unique values.

alias(name) : Define output column names.

Q.101 How to access filed token?

Ans: You can access field token either by accessing  static member variable name of an sObject static type or by calling the getSObjectField method on a field describe result.

In case if you have missed our Salesforce tutorial series, it is here for you:

Tutorial Index

  1. Introduction to Cloud Computing (Salesforce.com and Force.com)
  2. Overview of Database Concepts (Salesforce.com)
  3. Introduction to Force.com
  4. Building Salesforce Custom App and Objects
  5. Object Relationships and Formula Field in Salesforce
  6. Salesforce Security Model and Overview
  7. Automation in Salesforce
  8. Approval Process in Salesforce
  9. Introduction to SOQL and SOSL
  10. Introduction to Apex
  11. Salesforce Data Management
  12. Visualforce MVC Architecture on Cloud
  13. Salesforce Reports and Dashboards
  14. Building a Visualforce (Custom) Page for the Salesforce App
  15. Salesforce Sandbox and Overview of Force.com capabilities
  16. Learning Apex and Deployment Tools

Add a Comment

Your email address will not be published. Required fields are marked *