Salesforce Developer interview questions, and how to answer them

A Salesforce Developer interview checks one thing above the rest: whether your code survives real data inside a platform that punishes careless code. Expect to talk about bulk triggers, governor limits and test classes, and expect at least one moment where they hand you broken Apex and watch you read it. The questions below are the ones that come up, with what the interviewer is really listening for.

The process

What happens in each round

  1. 1

    Recruiter screen

    What happens

    Which clouds you've worked in, whether you've written Apex and Lightning Web Components yourself or mostly configured, and whether your certificates match the posting.

  2. 2

    Technical interview with a senior developer

    What happens

    How you think about triggers, bulk processing, sharing and the order of execution. Expect follow-ups that push on why, not just what.

  3. 3

    Live coding or code review exercise

    What happens

    Whether you spot a query inside a loop, a hardcoded record ID or a test class with no assertions, and whether you can fix it while talking through it.

  4. 4

    Take-home or portfolio walkthrough

    What happens

    A small feature built in a Developer Edition org or a scratch org: the trigger design, the component, the tests, and how you'd deploy it.

  5. 5

    Hiring manager or team fit

    What happens

    How you work with admins and business analysts, how you handle a release night that goes wrong, and whether you push back when a request should be a Flow instead of code.

Questions you're likely to get

1.What does it mean to bulkify a trigger, and can you show me one that isn't bulkified?

Why they ask

It's the single most common way Salesforce code breaks in production. A trigger that handles one record at a time passes every demo and dies on the first Data Loader import.

How to answer

  • Explain that a trigger receives a batch of records in Trigger.new, not a single record
  • Show the bad version: a SOQL query or DML statement inside a for loop
  • Rewrite it to collect IDs into a Set, run one query into a Map, then do one DML on a List
  • Mention that you test it by inserting a large list of records in a test method, not just one
2.How do you structure triggers in an org that already has several on the same object?

Why they ask

Most orgs they hire for are messy. They want to know whether you'll add yet another trigger or bring some order to it.

How to answer

  • One trigger per object, with the logic moved into a handler class
  • A trigger framework that routes by context: before insert, after update and so on
  • A way to switch handlers off for data loads, such as a custom setting or custom metadata bypass
  • Guarding against recursion with a static flag or by comparing old and new values
3.Walk me through what happens when a user saves an Opportunity.

Why they ask

The order of execution is where the hardest bugs live. A developer who knows it can explain why a field value changed twice or a flow saw stale data.

How to answer

  • System validation, then before-save flows and before triggers
  • Custom validation rules, duplicate rules, the record save, then after triggers
  • Assignment and auto-response rules, workflow and after-save flows, then roll-up summaries on the parent
  • Commit, then post-commit work such as emails and asynchronous jobs
4.When would you use Queueable Apex instead of a future method or Batch Apex?

Why they ask

Asynchronous Apex choices show whether you've handled real volume and callouts, or only small synchronous tickets.

How to answer

  • Future methods for a simple fire-and-forget callout, with the limits on what they accept
  • Queueable when you need to pass complex objects, chain jobs or get a job ID to monitor
  • Batch Apex for processing a very large set of records in chunks, with start, execute and finish
  • Scheduled Apex to kick off a batch at night, and how you'd watch for failures in Apex Jobs
5.This Apex class ignores sharing rules. How would you tell, and does it matter?

Why they ask

Security review is where a lot of developer code fails. They want to see you think about who can see what, not only whether the code runs.

How to answer

  • Check the class declaration: with sharing, without sharing, inherited sharing, or nothing at all
  • Explain that sharing keywords control record access, but not field-level security or object permissions
  • Use WITH USER_MODE in SOQL or Security.stripInaccessible to respect field access
  • Say when without sharing is justified, such as a system process, and how you'd document it
6.Build a Lightning Web Component that shows the open cases for the account a user is looking at.

Why they ask

Most postings now expect LWC. This checks whether you know the component model or only copied examples from Trailhead.

How to answer

  • Expose recordId with the @api decorator and place the component on the Account record page
  • Get data with a wired Apex method marked cacheable, or with the UI API where it fits
  • Handle loading, empty and error states in the template
  • Refresh the wired data with refreshApex after a user closes a case from the component
7.How do you write a test class that proves something, rather than just hitting coverage?

Why they ask

Every developer knows deployment needs coverage. The good ones write tests that would catch a real regression.

How to answer

  • Create test data in a @testSetup method or a test data factory, never rely on org data
  • Wrap the action in Test.startTest and Test.stopTest so limits reset and async jobs finish
  • Assert on outcomes: field values, record counts, thrown exceptions
  • Mock callouts with HttpCalloutMock and test as a restricted user with System.runAs
8.How would you connect Salesforce to an outside order system?

Why they ask

Integration work separates developers who've only built inside the org from those who've dealt with timeouts, retries and credentials.

How to answer

  • Ask first: which direction, how often, how much data, and what happens when it fails
  • Outbound: an Apex callout through a Named Credential, run asynchronously from a trigger
  • Inbound: a custom Apex REST resource or the standard REST API, with an integration user and a connected app
  • Event-driven options such as Platform Events or Change Data Capture, plus logging and retry for failures
9.How do you move your work from a sandbox to production?

Why they ask

Release nights go wrong often on this platform. They want to know you've been through one and have a process.

How to answer

  • Source in Git, using Salesforce DX and the Salesforce CLI to retrieve and deploy metadata
  • A pipeline tool such as Copado, Gearset or GitHub Actions to validate before the release window
  • Running the relevant tests and doing a quick deploy once validation passes
  • A rollback plan and a checklist for the things metadata doesn't carry, such as data and some settings
10.A business user asks for an automation. How do you decide between Flow and Apex?

Why they ask

Teams want a developer who writes less code, not more. Choosing Flow where it fits keeps the org maintainable for admins.

How to answer

  • Start with Flow for straightforward record updates and screens an admin can maintain
  • Move to Apex for complex logic, heavy data volume, callouts with tricky error handling or reusable services
  • Mention invocable Apex as a bridge: a Flow that calls a small, tested Apex method
  • Agree the choice with the admin team so nobody is surprised later
11.Tell me about a production bug you traced through debug logs.

Why they ask

Every Salesforce Developer ends up reading logs line by line. This shows how you actually debug under pressure.

How to answer

  • The symptom users saw and how you reproduced it in a sandbox
  • Setting trace flags and reading the log for the limit or exception that fired
  • The root cause, for example a managed package trigger and your own trigger updating the same record
  • The fix, the test you added, and what you changed so it wouldn't happen again
12.Why do you want to stay on Salesforce rather than general software development?

Why they ask

Some candidates see the platform as a stepping stone. The manager wants someone who'll keep up with its releases.

How to answer

  • Something specific you like about the platform, such as shipping business features fast
  • How you keep current: release notes, preview sandboxes, the developer blog
  • A part of the platform you want to go deeper on next

Mistakes that sink good candidates

Writing a SOQL query inside a loop during the live exercise, even when you're rushing

Talking about hitting coverage as the goal of testing

Dismissing admins or Flow as lesser work, since you'll be working next to them every day

Claiming experience with a cloud or tool you can't answer a basic follow-up on

Need more Salesforce Developer interviews to prep for?

HeroApply applies to Salesforce Developer jobs that match you, every day. 341 jobs are open today.

Find Salesforce Developer jobs