20 most common Salesforce developer interview questions and answers
7 min
If you’re reading this article you might be prepping for an interview or getting ready to send your resume. Either way, going through these interview Q&A will be fruitful for you. I can’t promise to give you the whole nine yards for interview questions, but I have tried to cover them to great extent. Once you are thorough with these I’m sure you will be a stone’s throw away from success.
In general, these questions are irrespective of the level of job you are going for. For freshers, there’s no harm in reading difficult-level questions as this will enhance your knowledge. I won’t be concentrating on basic questions like what Salesforce objects are, as they’re too basic and you should know what they are once you’ve decided to pursue a career in this area.
Time is money, so let’s get started:
1. What are the different types of sandbox available?
They are Developer, Developer Pro, Partial Copy and Full.
2. Can you name the ways in which deployment is possible in Salesforce?
- The ways in which deployment is possible in Salesforce are:
- Change Sets
- Salesforce Package
- Force.com Migration Tool – ANT/Java based
- Eclipse with Force.com IDE
3. Name different types of collections in Apex and what maps in it are.
Collections are the types of variables used to store data (multiple number of records). There are three types of collection in Salesforce. They are: Lists, Maps and Sets.
Maps in particular are a type of collection that is used to store data in the form of key-value pairs, where each unique key maps to a single value.
4. What are Lightning Web Components and Lightning Components? Are they the same?
They’re not the same, let me explain. Lightning Components is a modern UI framework for developing dynamic web apps of mobile technologies and desktop devices on Salesforce. You can build Lightning components using two programming models: the original model called Aura Components, and the Lightning Web Components.
Lightning Web Components were created to make Lighting Components easier for those who are not skilled in building on the Salesforce platform. To provide better access to developers, they use a standardized-based architecture and provide only what’s necessary to perform well in browsers supported by Salesforce.
5. What are the different types of email templates available in Salesforce?
- The different types of email templates available in Salesforce are:
- Text
- HTML with letterhead: Based on a letterhead, only Administrators and users with “Edit HTML Templates” permissions can create this template.
- Visualforce: This template can only be created by administrators and developers. Some of the advanced functionalities, like merging data from multiple records, are only available in this type of template.
- Custom HTML: Without the need of a letterhead, administrators and users having “Edit HTML Templates” permissions can create this template.
6. What are dynamic dashboards? Can they be scheduled?
Previously the dashboard could exclusively be accessed by a single static user, while with dynamic dashboards multiple users can now access the dashboard.
Each user can see the data they have access to, thanks to dynamic dashboards. You can control data visibility with a dynamic dashboard instead of having to develop a separate dashboard for each level of data access, complete with its own running user and folder.
7. Do you have any idea about External Id and all field data types that can be used for it?
External Ids are fields in objects used to match up data from external systems, with a unique reference ID. They’re mostly used when importing data (records), as a unique identifier. Also only custom fields can use them. Field data types that can be used as External ids are: auto-number, text, e-mail and number.
8. What can you tell us about Salesforce API and its usage?
There are various Salesforce APIs available to interact with the system.
- They are:
- Streaming: it’s used to get notification messages for any change in Salesforce data that is defined in SOQL.
- REST: It helps in integrating with Salesforce applications using simple HTTP methods in either XML or JSON formats, making this an ideal API for developing mobile applications or external clients.
- Bulk: It provides programmatic access due to which one can load data faster in Salesforce org.
9. Do you know what a Visualforce component is? How can we embed a VisualFlow in the Visualforce page?
Visualforce components are small, reusable pieces of functionality—think widgets, panels, user interface elements, that kind of thing—that you use in Visualforce page markup.
They can be standard Visualforce components (pre-built components, such as <apex:relatedList> and <apex:dataTable>) as well as custom components.
Follow the following steps to embed a Visualflow in the Visualforce page:
- Find the flow’s unique name: From Setup, in the Quick Find box, you can search for the Flows. The unique name of the flow can be found by clicking on a specific flow.
- From Setup, in the Quick Find box search for Visualforce pages. Select “New” or open the existing Visualforce page.
- Add the <flow:interview> component somewhere between the <apex:page> tags.
- Set the name attribute to the unique name of the flow and press “Save”.
- Next we can add restrictions on users that can access the Visualforce page.
- Add the Visualforce page to your Force.com app by using a custom button, link, or Visualforce tab.
10. List the different methods of the Batch Apex class.
- The different methods of the Batch Apex class are:
- Start method: global (Database.QueryLocator | Iterable<sObject>) start(Database. BatchableContext bc) {}
- Execute method: global void execute(Database.BatchableContext BC, list<P>){}
- Finish method: global void finish(Database.BatchableContext BC){}
11. What could cause data loss in Salesforce?
Some of the reasons for data loss in Salesforce could be: Moving the text, URL, or email from the text area, changing the date and time or changing the auto-number and the checkbox. It's possible to experience data loss while converting parameters from one data type to another like number and currency as well. Lastly, it can happen while importing data or Altering the multi-select picklist to other types.
12. Distinguish between Trigger and Workflow. When to use workflow and when to use triggers?
Apex triggers in Salesforce are distinct triggers, available specifically for common and expected actions such as lead conversions. It is just a code that is executed before or after a record is inserted or updated.
Workflow on the other hand is an automated process and uses no codewin .
13. What do you know about Governor Limit in Salesforce?
We’re aware that Salesforce is based on a shared database. Governor Limits are used to control how much data (records) can be stored in a shared database. This helps in avoiding monopoly by one user in using a database.
- 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
14. What are the different Salesforce Editions?
They’re Professional, Enterprise, Unlimited and Developer Editions.
15. What are the various events on which a trigger can fire?
A trigger will fire if its triggering condition occurs: insert, Update, Delete, Merge, Upsert or Undelete.
16. Can we create an Apex class in a live Production instance?
At this point of time, creating an Apex class in a live Production instance is not supported. Only Developer Edition, Sandbox, and Trial Organizations have the ability to create, edit, and delete Apex classes and triggers directly in the Salesforce CRM user interface.
17. What is a wrapper class?
Also known as container class, it’s a data structure that contains different types of objects, for example its members. A wrapper class is a custom object defined by the programmer.
18. What is the purpose of writing test class?
We all know the importance of testing. For similar reasons, we write test classes. This is written to ensure that Apex classes or triggers are working as expected.
19. What is the order of execution in Salesforce?
1. System Validation Rules
2. Apex Before Triggers
3. Custom Validation Rules
4. Duplicate Rules
5. Apex After Triggers
6. Assignment Rules
7. Auto-Response Rules
8. Workflow Rules
9. Processes
10. Escalation Rules
11. Roll-Up Summary Fields
if you want to get more info on the order of execution, you can check by clicking here.
20. What is the difference between upsert and insert?
Inserting is creating a new record and Upsert is editing and creating records.