Interview questionsUpdated 12 Oct 2026 · Team InterviewPlan

Salesforce Developer Interview Questions and Answers

Salesforce developer interviews test Apex and Lightning Web Components, but even more how well you work within the platform's limits and security model. These questions reflect what Salesforce developers are asked in 2026 by consulting partners, product companies and enterprise Salesforce teams, with model answers from real org work.

What interviewers test in a Salesforce developer interview

Most loops include Apex and trigger questions, an LWC round, a declarative versus code discussion and a scenario round on data volumes or integrations. Some partners give a live task, such as writing a bulkified trigger.

Interviewers look for platform judgement: knowing when a Flow is enough, writing code that respects limits and keeping security enforced in custom code.

  • Apex: triggers, classes, collections, exceptions and testing
  • Limits: SOQL and DML limits, CPU time and bulk patterns
  • UI: Lightning Web Components, wire service and events
  • Automation: Flows, validation rules and order of execution
  • Security and integration: sharing, CRUD and FLS, REST and Named Credentials

Technical topics to revise

Use a free Developer Edition org or Trailhead playground to write triggers, LWCs and tests. Interviewers often ask you to explain code you wrote, so build a small end-to-end feature you can discuss.

  • Governor limits: 100 SOQL queries and 150 DML statements per synchronous transaction
  • Trigger handler pattern, one trigger per object and recursion control
  • Order of execution: validation rules, before triggers, after triggers, flows and commit
  • Batch Apex, Queueable, future methods and Scheduled Apex
  • LWC: decorators, lifecycle hooks, wire adapters, Lightning Data Service and Lightning Message Service
  • with sharing, without sharing, WITH USER_MODE and Security.stripInaccessible
  • Named Credentials, Platform Events and Change Data Capture
  • Salesforce DX, scratch orgs, Git-based deployment and DevOps Center

How to structure your answers

For coding questions, mention bulkification and limits before writing code, then explain how you would test it. For design questions, compare a declarative option with code and justify your choice.

In project stories, cover the business process, the org scale, your solution and a measurable result, like reduced manual steps or faster page loads.

How InterviewPlan AI helps you prepare

Salesforce mock interviews ask Apex, LWC and scenario questions and give feedback on your explanations. Resume AI helps express Salesforce work in business results, such as automating case routing.

During interviews, Interview Copilot provides live speaker-labelled transcription and resume-grounded drafts. Once hired, Salesforce Job Support gives expert-plus-AI help with stories, deployments and code reviews in your first 90 days, at $5 per hour with 200 AI credits per hour.

Questions and model answers

9 questions you are likely to hear.

  1. What is bulkification and why is it important?

    Why they ask: Bulkification is the most fundamental Apex best practice because of governor limits.

    Sample answer: Bulkification means writing code that handles many records in one transaction efficiently, because triggers can receive up to 200 records at a time and data loads can process thousands. I never put SOQL queries or DML statements inside loops. Instead I collect IDs into a set, run one query into a map, process records in memory and do a single DML on a list. Without this, a data load hits the 100 SOQL limit quickly. I once fixed a trigger on Opportunity that failed every Data Loader import of more than 100 rows because of a query inside a for loop.

  2. When would you use a before trigger versus an after trigger?

    Why they ask: This tests understanding of trigger context and order of execution.

    Sample answer: I use before triggers to validate or modify fields on the records being saved, because changes are saved without an extra DML, for example setting a region based on a billing state. I use after triggers when I need the record ID or system fields, or to work with related records, such as creating a follow-up task for a new opportunity or updating parent account totals. Updating the same records in an after trigger needs another DML and risks recursion. Today I also check whether a before-save record-triggered Flow handles simple field updates more maintainably.

  3. Explain the difference between Batch Apex, Queueable and future methods.

    Why they ask: Async Apex choice affects scalability and reliability.

    Sample answer: Future methods are simple asynchronous calls for things like callouts from triggers, but they accept only primitive parameters, cannot be chained and are hard to monitor. Queueable Apex accepts complex types, returns a job ID for monitoring and allows chaining, so I use it for most async work. Batch Apex processes large data volumes in chunks, up to millions of records, each with fresh governor limits, using start, execute and finish methods. In one org I used Batch Apex to recalculate territory assignments on around 2 million accounts overnight, with a Queueable chained from finish to send a summary.

  4. How do LWC components communicate with each other?

    Why they ask: Component communication is a core LWC skill.

    Sample answer: Parent to child, I pass data through public properties decorated with @api or call public methods on the child. Child to parent, the child dispatches a CustomEvent that the parent handles. For components that are not in the same hierarchy, such as two components on different parts of a Lightning page, I use Lightning Message Service with a message channel. I avoid the older pubsub pattern. For example, on a service console page I used LMS so that selecting a case in one component refreshed a related knowledge articles component elsewhere on the page.

  5. How do you enforce security in Apex code?

    Why they ask: Apex runs in system mode by default, so security mistakes can expose data.

    Sample answer: I declare classes with sharing by default so record-level sharing rules apply, using without sharing only where there is a clear, documented reason. For object and field-level security, I run queries WITH USER_MODE or use Security.stripInaccessible before returning data to the UI, and I check CRUD before DML operations. In LWC I prefer Lightning Data Service where possible, since it respects security automatically. I also avoid dynamic SOQL with user input or use bind variables to prevent SOQL injection. A security review once found a without sharing controller exposing salary fields, which I fixed with user mode queries.

  6. When would you choose a Flow over Apex?

    Why they ask: Interviewers check platform judgement, not just coding ability.

    Sample answer: I choose Flows for straightforward automation that admins should be able to maintain, such as field updates, simple record creation, approval routing and screen-guided processes. I choose Apex for complex logic, heavy data processing, complex integrations, sophisticated error handling or when performance and testability matter. I also avoid mixing many Flows and triggers on the same object without a clear order. On one project, a lead assignment process was split between three Flows and a trigger; consolidating complex rules in a single Apex handler and leaving simple updates in a before-save Flow made behaviour predictable.

  7. How do you integrate Salesforce with an external REST API?

    Why they ask: Integrations are a large part of most Salesforce developer roles.

    Sample answer: For outbound calls, I set up a Named Credential with an External Credential to handle the endpoint and authentication securely, then make HTTP callouts from Apex, usually from Queueable Apex if triggered by a record change, since callouts are not allowed directly in triggers. I parse JSON with typed wrapper classes, handle errors and retries, and log failures to a custom object. For inbound, I expose an Apex REST resource or use the standard REST API with a connected app. Tests use HttpCalloutMock. I built this pattern to sync orders with an ERP in near real time.

  8. How do you write good Apex test classes?

    Why they ask: Tests are required for deployment, but interviewers want quality, not just coverage.

    Sample answer: I aim well above the 75 percent minimum, but focus on asserting behaviour rather than just running lines. I create test data in a @TestSetup method or with a test data factory, never relying on org data. I test bulk scenarios with 200 records, negative cases and different user profiles with System.runAs. I wrap the action between Test.startTest and Test.stopTest so async jobs execute and limits reset. Callouts use mocks. In one org, adding real assertions to existing tests exposed two triggers that silently did nothing in bulk loads.

  9. Tell me about a challenging Salesforce project you delivered.

    Why they ask: This shows depth, ownership and stakeholder handling.

    Sample answer: For a healthcare services company, case routing was manual and agents spent a lot of time picking cases. I worked with the BA to design skill-based routing using Omni-Channel, wrote Apex to calculate case priority from SLA and customer tier, and built an LWC console component showing case context and recommended articles. I handled a large data migration of historical cases with Batch Apex. After rollout, the average time to first response dropped significantly, and supervisors got a real-time dashboard instead of exporting reports to Excel.

FAQ

Questions people ask about salesforce developer.

Which certifications help in Salesforce developer interviews?

Platform Developer I is the baseline for most roles, and Platform Developer II and JavaScript Developer I help for senior or LWC-heavy roles. Admin certification is also useful. Interviewers still test real coding and scenario judgement.

Is Aura still asked in Salesforce interviews?

Occasionally, for orgs with legacy components. Most new development uses Lightning Web Components, so focus there, but know enough Aura to maintain or migrate existing components and explain how they interoperate.

Do Salesforce developers need to know admin features?

Yes. Interviewers expect knowledge of objects, fields, profiles, permission sets, sharing rules, Flows and validation rules. Strong developers know when configuration is better than code and can explain the trade-off.

Is Salesforce Job Support available?

Yes. InterviewPlan AI's Salesforce Job Support offers live expert-plus-AI help in your first 90 days with Apex, LWC, Flows and deployments. It costs $5 per hour including 200 AI credits, and hours never expire.

P.S.

Reading helps. Practising out loud helps more.

Start free with 5 live minutes and 100 AI credits for Resume AI, Job Search, Auto-Apply, mock interviews and Behavioral Coach.