1. What is Salesforce?
Answer: Salesforce is a company founded by Marc Benioff. Revenue of the company comes from a cloud-based CRM tool also referred to as Salesforce CRM.
2. List things that can be customized on page layouts?
Answer: We can customize different things on page layout like Fields, Buttons, Custom Links and Related Lists. We can also create sections.
3. What is an attribute tag? What is the syntax for including them?
Answer: An attribute tag is a definition of an attribute of a custom component and it can only be a child of a component tag.
4. What is a Visualforce component?
Answer: A Visual force Component is either a predefined component (standard from the 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 Visual force components.
5. What are getter methods and setter methods?
Answer: 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 the 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 here: Salesforce Certifications. 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 57 Frequently Asked Salesforce Interview Questions which was delivered by an industry expert. He has shared his opinion of (Mulesoft Training )Salesforce job interviews and industry demand. Do take an at it look and let us know if this helped in your interview preparation.
6. Consider a scenario I have not given any CRUD permission in the profile ‘P1’ for an object O1, yet I’m able to create records for object ‘O1’. How could this be possible?
Answer: Any permission with respect to creation /deletion/Updating/viewing of the object is possible only through permission set or Profile.
Meaning If we are able to create records in an object then the Create Permission in either Profile or in (Selenium Training )Permission Set should be enabled. If it’s not enabled in the Profile then it has been in the Permission Set. ( python training )
7. I have a Standard Controller and Controller Extension. You can write all that logic in Controller Extension which can be written in Custom Controller. Also, both Controller Extenstion and Custom controller execute in System Mode. So Why do we need Custom Controller?
Answer: 1st point Controller Extension cant exists on its own. It has to be implemented on a Standard Controller or a custom controller.(Sap Fico Online Training )
So keeping the above point in mind, let’s say certain methods needs to be executed in User Mode and certain in System Mode. In this scenario, it makes absolute sense to User Standard Controller with Custom Extension. Where in using Standard Controller provides all pre-existing features of Force.com platform.
But note that When we use Standard Controller All the Sharing rules, permissions of a user are respected.
So if this what we wanted then we should go for implementation of this sort.
8. What are the different kinds of reports in Salesforce?
Answer: The different kind of reports in salesforce is
Tabular Report: It is similar to a spreadsheet and this report is the simplest and fastest way to see the data. Tabular reports are best to create the lists of record.
Summary Report: It is similar to the tabular report, but allows users to group rows of data, view subtotals, and create charts.
Matrix Report: It is similar to the summary report, but it allows users to group and summarize data by both rows and columns.
Joined Report: Joined reports let we create multiple report blocks that provide different views of our data and each block act as a sub-report.
9. Why users can’t be deleted from salesforce.com?
Answer: In order to maintain data integrity in salesforce and historical records of who did what and when, and to support audit process, the Users are not allowed to delete in salesforce but can be deactivated.
10. What is the difference between Force.com and Salesforce.com?
Answer: Force.com is a cloud computing platform where the developers build multi-tenant applications.
Salesforce.com is a cloud computing platform, it contains only standard objects. Salesforce.com is hosted on force.com platform.
11. What are inner classes in Salesforce?
Answer: Inner Classes are classes defined within another class. We can only have inner classes 1 level deep. We don’t have to use an access modifier in the declaration of an inner class since the default value is a private ( devops training )
12. What are the different Salesforce.com editions?
Below are the different Salesforce editions:
1. Personal Edition
2. Contact Manager Edition
3. Group Edition
4. Professional Edition
5. Enterprise Edition
6. Unlimited and Performance Edition
7. Developer Edition
13. What is the difference between WhoId and WhatId in the Data Model of Task?
Answer: Who Id refers to people things. So that would be typically a Lead ID or a Contact ID
what refers to object type things, That would typically be an Account Id or an Opportunity Id.
14. What is the difference between Lookup and Master-Detail relationship?
Answer: Difference between Lookup and Master-Detail relationship are
1. Cascade record deletion
2. Child record must have a parent
3. Cascade record-level security
4. Standard Object can not be on the detail side of Master Detail
5. Roll-up summary fields on the parent object
6. Master-Detail relationship field is required on the page layout of the detail (Azure Training )record
1. This is optional, no parent requirement
2. No impact on record security
3. Roll-up summary fields cannot be established
4. Lookup relationship is not automatically required
15. What is the use of Salesforce.com sites?
Answer: Force.com enables you to create public websites and actions that are directly integrated with your Salesforce.com organization without requiring users to log in with a username and password. Any information stored in the organization can be publicly exposed through a branded URL. Sites are hosted on Force.com platform and built on visual force pages.
16. What is a different kind of reports in Salesforce?
There are 4 types of reports in Salesforce
1. Tabular: Tabular reports are similar to spreadsheets, consist of an ordered set of fields in columns with each matching record listed in a row. Tabular reports are best for creating a list of records with a single grand total. These reports can’t be used in Dashboards unless the number of rows is specified.
2. Summary Reports: Summary Reports are similar to tabular reports, but also allow users to group rows of data, view subtotals and create charts. These can be used as source reports for dashboards.
3. Matrix Reports: Matrix Reports are very similar to Summary Reports but allow you to group and summarize data by both rows and columns. These reports can be used as source reports for dashboards
4. Joined Reports: Joined Reports let you create multiple report blocks that provide different views of your data. Each block act like a sub-report with its own fields, columns, sorting and filtering. A joined report can even contain data from different report types.
17. What is the architecture of the salesforce?
Answer: Salesforce follows MVC –Model, View and Controller architecture.
View: stands for the user interface (Apps, Tabs, Page Layouts, Fields and Record Types)
Controller: stands for Business Logic (Save, Edit, New, Cancel and Delete – what action or logic to perform on click of these buttons is provided in Controller)
Model: It is the Database, which stores Schema (Meta-Data (Data about Data) –> Apps, Tabs, subjects, fields, Apex Classes, Visualforce pages, etc…) and Instance (Records)
18. What is Production ? and What is the production URL?
Answer: We should not make any code changes directly in production because end-users are using the application from the production environment. If we make code changes directly to production without doing complete testing, it might crash the production environment and end-users will get affected. Production.
19. How do we expose functionality on Force.com to be consumed by external clients?
Answer: Using web services, external program access the functionality on force.com platform. WSDL will be generated and exposed to the host environment which results in extending the capability of accessing (Sql Server Training )force.com platform from an external program.
20. What are the differences between Roles and Profiles?
1. Role controls the visibility and access to the organization’s data at the record level.
2. Roles are optional for users.
1. Profiles are set of permissions and settings which determines the objects, the fields of the object, tabs, and apps the user can access
2. every user must associate with one Profile
21. How to Rename the tab?
Answer: Tab name is derived from the Plural label field on the custom object. In order to rename, go to the corresponding object detail page and rename the plural label.
22. Can two users have the same profile? Can two profiles be assigned to the same user?
Answer: 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 needs access to additional records/ objects then it can be done by assigning permission sets only for those users.
23. What are Governor Limits in Salesforce?
Answer: In Salesforce, it is the Governor Limits which controls how much data or how many records you can store in the shared databases. 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.
multi-tenant architecture – salesforce interview questions
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
24. Consider a scenario I have two objects Obj1 and Obj2 which are not related to each other. Now I want to create a Master-Detail Relationship(MDR) between these objects How can I do this?
Answer: First, choose which object has to be a Parent object(Master) and Child Object(Detail).
For our understanding lets say for now we decide Obj1 be Master object and Obj2 to Detail object.
First, let’s understand what’s a Master-Detail relation? Every child should have a parent. Which
means every record in Obj2 should have a related parent record in Obj1. Also, One child can have only one parent. But One parent can have multiple children.
Scenario 1: if there are pre-existing records in the Obj2 then?
With the above understanding of Master-Detail relation, we have to be sure that every record in Obj2 has a related record in Obj1.
And in our scenario, Obj1 and Obj2 are not related to each other. So first we have to create a basic Lookup relation between these two objects so that we can establish a relation between these two objects. ( oracle apex training online )
So we follow the below steps
1. we create a Lookup field in the Child Object Obj2 pointing to Obj1 as a parent.
2. Update the Lookup field of all the records in Obj2 with a value from the Obj1 (Related field)
3. Then we convert the Lookup the field to Master-Detail relation.
Scenario2: If there are no pre-existing records in the Obj2 then?
25. What are the different types of Accounts in salesforce?
There are 2 types of Accounts in Salesforce:
1. Personal Accounts :
Associated with a single person and Person name will be taken as the primary consideration
2. Business Accounts:
The company name will be taken into primary consideration . ( data science training )
26. How to create Many-To-Many Relationship in Salesforce?
Answer: Many-To-Many Relationship is also called Junction object in Salesforce. It can be created with the below steps.
1. Create Both Objects which should be interlinked.
2. Create one custom object, also called a Junction object, which should have an auto number as unique identification.
3. Create 2 Master relationships for both objects.
4. On both objects, add this as a related list. ( hadoop training online )
27. What is difference insert() and database .insert()?
Answer: Using the insert method we can insert the records but if any error occurs in any record system will throw an error insertion fail and none of the records are inserted.
If we want to execute partially success of bulk insert operation we will use database .insert. ( data science online training )
28. How many ways we can share a record?
If we add a user to a role, the user is above in the role hierarchy will have read access.
Setup -> manage users -> roles -> setup roles -> click on ‘add role’ -> provide name and save.
OWD: Defines the baseline setting for the organization.
Defines the level of access to the user can see the other user’s record
OWD can be Private, Public Read Only, Public Read and Write.
Setup -> Security Controls -> sharing settings -> Click on ‘Edit’
Manual Sharing: Manual Sharing is sharing a single record to a single user or group of users.
We can see this button detail page of the record and this is visible only when OWD setting is private.
Criteria Based Sharing rules: If we want to share records based on condition like share records to a group of users ( hadoop training videos )
Whose criteria are country is India?
Setup -> security controls -> sharing settings -> select the object and provide name and
Conditions and save
Share object is available for every object(For Account object share object is Account Share ). If we want to share the records using apex we have to create a record to the shared object.
29. What are the different types of collections in Apex? What are maps in Apex?
Answer: Collections are the type of variables which can be used to store multiple numbers 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 (Servicenow Training )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.
30. what would be the best possible solution to keep this application intact and running and yet have this user deactivated?
Answer: To prevent users from logging into your organization while you perform the steps to deactivate them, you can freeze user accounts.
So in this way, until you find ways to remove this User from Role hierarchy/assignment rules/update the Owner of the records created by him / from any place where this user is used, we can make use of FREEZE button on the user record. ( tableu training )
1. When we click on the FREEZE button, the user will not be able to login to the application anymore.
2. Freezing user accounts doesn’t free the user licenses available for use in your organization. We have to deactivate the user to free the license.
All Salesforce Interview Questions
Mentor Based Training40 Classes | 80+ Challenges
- Experienced Faculty
- Real-time Scenarios
- Free Bundle Access
- Course Future Updates
- Sample CV/Resume
- Interview Q&A
- Complimentary Materials