AWS Solutions Architect Certification Trainin ...
- 141k Enrolled Learners
- Weekend/Weekday
- Live Class
As of Jan 2023, 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 with answers.
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 the interview. Hopefully this helps you land a top-notch job in the domain of your passion. In case you attended a any interview recently, we urge you to post any question you have faced. Our experts will be happy to answer them for you.
Below are the top technologies to learn in 2023
This list of interview questions is divided into 9 sections, each for different aspects of Salesforce.
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.
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. To learn more about it, enroll for Salesforce developer certification today.
Different Governor Limits in Salesforce are:
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:
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.
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}
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:-
WhoID refers to people. Typically: contacts or leads. Example: LeadID, ContactID
WhatID refers to objects. Example: AccountID, OpportunityID
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.
The different types of Email templates are listed in the below table:-
Text | All users can create or change 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 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 |
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.
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.
1. Tabular reports | Simple Excel type tables which provide a list of items with the grand total |
2. Summary reports | Similar to Tabular reports, but also 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 different reports based on same or different report types |
Another important point to note here is that, only Summary reports and Matrix reports can be fed as data source for dashboards. Tabular and Joined reports cannot be used as data source 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.
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:
In a Master-Detail relationship, when a master record is deleted, the detail record is deleted automatically (Cascade delete).
In a Lookup relationship, even if the parent record is deleted, the child record will not be deleted.
Yes. You can have a roll-up summary in case of a master-detail relationship. But not in case of a lookup relationship.
A roll-up summary field is used to display a value in a master record based on the values of a set of fields in a detail record. The detail record must be related to the master through a master-detail relationship.
There are 4 calculations that you can do using roll-up summary field. You can count the number of detail records related to a master record. Or, you can calculate the sum, minimum value, or maximum value of a field in the detail records.
“Data skew” is a condition which you will encounter when working for a big client where there are over 10,000 records. When one single user owns that many records we call that condition ‘ownership data skew’.
When such users perform updates, performance issues will be encountered because of “data skew”. This happens when a single user/ members of a single role own most of the records for a particular object.
In Salesforce, skinny 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 source tables are modified, skinny tables will be in sync with source tables.
Considerations for skinny tables:
Only the following fields are automatically indexed in Salesforce:
In a Data Loader .CSV, if there is a comma in field content, you will have to enclose the contents within double quotation marks: ” “.
Time dependent workflow action cannot be create for: “created, and every time it’s edited”.
There are two types of custom settings in Salesforce: List Custom Settings and Hierarchy Custom Settings.
List Custom Settings are a type of custom settings that provides a reusable set of static data that can be accessed across your organization irrespective 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 custom settings is that it allows developers to create a custom set of access rules for various users and profiles.
Only one rule can be active at a time.
Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values here can be translated into any language supported by Salesforce.
Their benefit is that they enable developers to create multilingual applications which automatically presents information in a user’s native language.
You can create up to 5,000 custom labels for your organization, and they can be up to 1,000 characters in length.
As mentioned in one of the previous Salesforce interview questions, a profile will ultimately control access to which records a user has in a Salesforce org. No user can work on the Salesforce org without being assigned a profile. The Profile is therefore mandatory for every user.
Role however is not mandatory for every user. The primary function of the Role/ Role hierarchy is that it allows higher level users in hierarchy get access 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.
Before I mention some of the examples, let me give you an introduction to deterministic and non-deterministic formula fields. Formula fields whose value will be static are referred to as deterministic fields. Whereas, formula fields whose value 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 example of that is a formula returning the current date and time.
Some examples of non-deterministic fields in Force.com are:
Software developers from around the world 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 programming language. Since Unit tests are powerful in their own right, Salesforce requires you to write test classes in Apex code.
Why are they so powerful? Because test classes and test methods verify whether a particular piece of code is working properly or not. If that piece of code fails, then developers/ testers can accurately locate the test class having the faulty bug.
Test classes can be determined easily because every test class will be annotated with @isTest keyword. In fact, if we do not annotate a test class with @isTest, then it cannot be defined as a test class. Similarly, any method within a class which has the keyword testMethod, is a test method.
In Salesforce, if you want to deploy your code to production, then you must make sure that at least 75% of your Apex code is covered by unit tests. And all these tests must complete successfully.
You can deploy code in Salesforce using:
An external ID is a custom field which can be used as a unique identifier in a record. External IDs are mainly 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 fields can be used as External IDs. The fields that can be marked as external IDs are: Text, Number, E-Mail and Auto-Number.
Governor limits will restrict a single Apex transaction to make a maximum of 100 callouts to an HTTP request or an API call.
You can expose your Apex class and methods so that external applications can access your code and your application through the REST architecture. This is done by defining your Apex class with the @RestResource annotation 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 always uses system context. Consequently, the current user’s credentials are not used, and any user who has access to these methods can use their full power, regardless 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 inadvertently exposing any sensitive data. Look at the below piece of code for instance:-
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 salesforce.com. //So need to map the Plan class object to Account standard object Account acct = new Account(); acct.Name = vPlan.name; acct.AccountNumber = String.valueOf(vPlan.planNumber); insert acct; vPlan.planId=acct.Id; return vPlan; } }
Find out our Salesforce Training Course in Top Cities
Standard controller 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 controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Custom Controllers are associated with Visualforce pages through the controller attribute.
To control the number of records displayed on each page, we use pagination. By default, a list controller returns 20 records on the page. To customize it, we can use a controller extension to set the pageSize. Take a look at the sample code below:-
<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"> {!a.name} </apex:dataList> </apex:pageBlockSection> <apex:panelGrid columns="2"> <apex:commandLink action="{!previous}">Previous</apex:commandlink> <apex:commandLink action="{!next}">Next</apex:commandlink> </apex:panelGrid> </apex:form> </apex:pageBlock> </apex:page>
To call a controller method (Apex function) from JavaScript, you need to use actionfunction.
Look at the below piece of code to understand how a controller method is called using actionfunction.
<script> function JSmethodCallFromAnyAction() { callfromJS(); } </apex:page>
You can get the ID’s of all the currently logged in users by using this global function: UserInfo.getUserId().
The Governor Limits enforces the following:-
Maximum number of records that can be retrieved by SOQL command: 50,000.
Maximum number of records that can be retrieved by SOSL command: 2,000.
An attribute tag is a definition of an attribute of a custom component and it can only be a child of a component tag.
Note that you cannot define attributes with names like id or rendered. These attributes are automatically created for all custom component definitions. The below piece of code shows the syntax for including them:
<apex:component> <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"/> </p> <p> </p> <p> </p> <p> </p> <h1 style="border:{!borderColor}"> <apex:outputText value="{!myValue}"/> </h1> <p> </p> <p> </p> <p> </p> <p> </apex:component>
There are three types of bindings used in Salesforce:-
Data bindings and Action bindings are the most common and they will be used in every Visualforce page.
Collections are the type of variables which can be used to store multiple number of records (data).
It is useful because Governor Limits restrict the number of records you can retrieve per transaction. Hence, collections can be used to store multiple records in a single variable defined as type collection and by retrieving data in the form of collections, Governor Limits will be in check. Collections are similar to how arrays work.
There are 3 collection types in Salesforce:
Maps are used to store data in the form of key-value pairs, where each unique key maps to a single value.
Syntax: Map<String, String> country_city = new Map<String, String>();
For example:
</apex:page> <flow:interview name="flowuniquename"/> <apex:page>
Future annotations are used to identify and execute methods asynchronously. If the method is annotated with “@future”, then it will be executed only when Salesforce has the available resources.
For example, you can use it while making an asynchronous web service callout to an external service. Whereas without using the annotation, the web service callout is made from the same thread that is executing the Apex code, and no additional processing will occur until that callout is complete (synchronous processing).
Database.Batchable interface contains three methods that must be implemented:
A Visualforce Component is either a predefined component (standard from component library) or a custom component that determines the user interface behavior. For example, if you want to send the text captured from the Visualforce page to an object in Salesforce, then you need to make use of Visualforce components. Example: <apex:detail>
Triger.new is a command which returns the list of records that have been added recently to the sObjects. To be more precise, those records will be returned which are yet to be saved to the database. Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.
But just for your information, Trigger.old returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers.
Sets can have any of the following data types:
An sObject is any object that can be stored in the Force.com platform database. Apex allows the use of generic sObject abstract type to represent any object.
For example, Vehicle is a generic type and Car, Motor Bike all are concrete types of Vehicle.
In SFDC, sObject is generic and Account, Opportunity, CustomObject__c are its concrete type.
The differences are mentioned in the table below:
SOQL (Salesforce Object Query Language) | SOSL (Salesforce Object Search Language) |
Only one object can be searched at a time | Many objects can be searched at a time |
Can query any type of field | Can query only on email, text or phone |
Can be used in classes and triggers | Can be used in classes, but not triggers |
DML Operation can be performed on query results | DML Operation cannot be performed on search results |
Returns records | Returns fields |
An Apex transaction represents a set of operations that are executed as a single unit. The operations here include the DML operations which are responsible for querying records. All the DML operations in a transaction either complete successfully, or if an error occurs even in saving a single record, then the entire transaction is rolled back.
Global class is accessible across the Salesforce instance irrespective of namespaces.
Whereas, public classes are accessible only in the corresponding namespaces.
Get (getter) method is used to pass values from the controller to the VF page.
Whereas, the set (setter) method is used to set the value back to controller variable.
I hope this set of Salesforce interview questions will help you ace your job interview. As the next step for your career, check out the various certifications offered by Salesforce. It will also help you to understand the job roles and chalk out a career path for yourself.
Also, check out this video on the Top 50 Frequently Asked Salesforce Interview Questions which was delivered by an industry expert. He has shared his opinion of Salesforce job interviews and industry demand. Do take a at it look and let us know if this helped in your interview preparation.
Got a question for us? Please mention it in the comments section and we will get back to you.
Course Name | Date | |
---|---|---|
Salesforce Training Course: Administrator and App Builder Certification | Class Starts on 28th January,2023 28th January SAT&SUN (Weekend Batch) | View Details |
Salesforce Training Course: Administrator and App Builder Certification | Class Starts on 13th February,2023 13th February MON-FRI (Weekday Batch) | View Details |
Salesforce Training Course: Administrator and App Builder Certification | Class Starts on 25th February,2023 25th February SAT&SUN (Weekend Batch) | View Details |
edureka.co
Can anyone help me for salesforce testing questions..
good question set really helpfull! Thanks for sharing
thanks for the help @Vardhan
but i need to know about Salesforce certification
Hey Vardhan, thanks for your Top 50 Salesforce Interview Questions And Answers. These questions are concise and very well explained. My only recommendation would be to include the data sources file so that everyone can find it easily.
One more thing I recommend JustCerts .com for the best preparation of Salesforce certification exam.
How many Extension can be used on a page.If I have 5 extensions and all extensions have method m1. How can we call the method m1 of 4th extension.
Nice interview questions and answer
Hey Farrukh, we are glad you loved our blog. Do check out our other blogs too. Cheers!
Very well written! Thank you.
Recommended. Thanks for the share
Hey Lokesh, thanks for checking out our blog. We’re glad we could be of help.
Do subscribe to stay posted on upcoming blogs. Cheers!
Highly recommended! Thanks for sharing
Hey Amalik, thanks for the wonderful feedback! We’re glad you found our blog useful.
You might also like our tutorials here: https://www.youtube.com/edurekaIN.
Do subscribe to stay posted on upcoming blogs and tutorials. Cheers!
Hi, for latest updated salesforce certification dumps / Sample questions with correct answers contact us on [email protected]
More Details visit: https://salesforcecertificationdumps.blogspot.in