Pages

Salesforce Interview Questions And Answers

As of Jan 2021, Salesforce is the world’s leading CRM service provider. They have more than 40% market share in the Cloud CRM space and dominates the overall CRM space with a market share of 19.7%. They were rated the world’s #1 CRM for two consecutive years and if the projected growth of Salesforce is anything to go by, the need for professionals with Salesforce training is only going to exponentially increase. This is where Salesforce enters the picture, and that is what has prompted me to write a blog on the most frequently asked Salesforce interview questions.

Thanks to the knowledge 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 a salesforce interview. Hopefully this helps you land a top-notch job in the domain of your passion. In case you attended a Salesforce interview recently, we urge you to post any question you have faced. Our experts will be happy to answer them for you.

Want to Upskill yourself to get ahead in Career? Check out the Top Trending Technologies.
Top 50 Salesforce Interview Questions And Answers
This list of Salesforce interview questions is divided into 9 sections, each for different aspects of Salesforce.

Salesforce fundamentals
Declarative features
Audit & reporting features
Data modelling and data management
Logic & process automation
Software testing
Debug & deployment tools
Integration features
Programmatic features
A. Salesforce Fundamentals – Salesforce Interview Questions
1. Can two users have the same profile? Can two profiles be assigned to the same user?
Profiles determine the level of access a user can have in a Salesforce org.

As far as the first part of the question is concerned, Yes. One profile can be assigned to any number of users. Take the example of a Sales or Service team in a company. The entire team will be assigned the same profile. The admin can create one profile: Sales Profile, which will have access to the Leads, Opportunities, Campaigns, Contacts and other objects deemed necessary by the company.

In this way, many users can be assigned the same profile. In case the team lead or manager need access to additional records/ objects then it can be done by assigning permission sets only for those users.

Answering the second part of the question, each user 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 shared databases. Why? Because Salesforce is based on the concept of multi-tenant architecture. In simpler words, Salesforce uses a single database to store the data of multiple clients/ customers. The below image will help you relate to this concept.
To make sure no single client monopolizes the shared resources, Salesforce introduced the concept of Governor Limits which is strictly enforced by the Apex run-time engine.

Governor Limits are a Salesforce developer’s biggest challenge. That is because if the Apex code ever exceeds the limit, the expected governor issues a run-time exception that cannot be handled. Hence as a Salesforce developer, you have to be very careful while developing your application.

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
3. What is a sandbox org? What are the different types of sandboxes in Salesforce?
A sandbox is a copy of the production environment/ org, used for testing and development purposes. It’s useful because it allows development 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 Force.com application or Visualforce page. You can develop and test it in the Sandbox org instead of doing it directly in production.

This way, 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 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 directly in production environment.

It needs to be done first in Developer edition or testing org or in Sandbox org. Then, to deploy it in production, 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 production.

Only if the page has to do something unique (different 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 field record name can have data type of either auto number or text field with a limit of 80 chars.

For generating auto numbers, the format needs to be specified while defining the field and after that for every record that is added, the number will get auto generated. For example:-
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 cross site scripting. Take a look at the highlighted portion in the below Visualforce page:-

B. Declarative Features – Salesforce Interview Questions
7. What is WhoId and WhatId in activities?
WhoID refers to people. Typically: contacts or leads. Example: 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 example 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.
Example: Sharing rules are used to extend sharing access to users in public groups or roles. Hence, sharing rules are not as strict as organization-wide default settings. They allow greater access for those users.

As far as the second part of the question is concerned, the answer is no. We cannot use sharing rules to restrict data access. It is only used for allowing greater access 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:-

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 need of a letterhead

Visualforce Only administrators and developers can create this template. Advanced functionalities like merging data from multiple records is available only in this template


C. Audit & Reporting Features – Salesforce Interview Questions

10. What is a bucket field in reports?
A bucket field 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 report 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 first understand static dashboards. Static dashboards are the basic dashboard types that will be visible to any user who has made a report out of his data. An example of this is what a Sales manager/ Marketing manager would be able to see on his Salesforce org. In other words, a normal dashboard shows data only from a single user’s perspective. Now comes the concept of dynamic dashboards.

Dynamic dashboards are used to display information which is tailored to a specific user. Let us consider the same example as above. In case the Sales manager wants to view the report generated specific to only one of his team members, then he can use dynamic dashboards.

You can use dynamic dashboards when you want to show user-specific data of a particular user, such as their personal quotas and sales, or number of case closures, or leads converted etc.
You can also use a normal/ static dashboard when you want to show regional or organization-wide data to a set of users, such as a particular region’s sales number, or a particular support team’s performance on case closures.

As far as the second part of the question is concerned, no we cannot schedule a dynamic dashboard. That is because whenever we open the dashboard, it will show the data generated in real-time.

What are the different types of object relations in salesforce? How can you create them?
No list of Salesforce interview questions is complete 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 object relationships in Salesforce are:

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 objects, or between a custom object and standard object as long as the standard object is the master in the relationship.

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 here is that despite being controlling field, deleting a record will not result in automatic deletion of the lookup 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.

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.


No comments:

Post a Comment