Salesforce developer interview questions test Apex and the platform's limits: triggers and bulkification, governor limits, SOQL, asynchronous Apex, sharing and user-mode security, Lightning Web Components, testing and the order of execution. A strong answer always mentions bulk data and limits, because the platform is multitenant.
Governor limits below are as the Apex Developer Guide listed them on November 17, 2026. This page is about developing on Salesforce, not about interviewing at Salesforce the company; see also Salesforce admin interview questions for configuration and Salesforce coding interview questions for the company's own engineering loop.
Salesforce developer fundamentals: questions 1–9
- What is Apex? Salesforce's strongly typed, Java-like language that runs on the platform inside transactions, with built-in database access through SOQL and DML and strict per-transaction governor limits.
- Which governor limits should you know? Per transaction, per the Apex Developer Guide on November 17, 2026: 100 SOQL queries synchronous (200 async), 150 DML statements, 50,000 rows retrieved by SOQL, 10,000 rows processed by DML, 10,000 ms CPU synchronous (60,000 async) and 10 MB heap synchronous (25 MB async). Exceeding one throws an exception you can't catch.
- Before vs after triggers? Before triggers change or validate field values on the records being saved without extra DML; after triggers work with saved records that have Ids, for example to create related records.
- Which trigger context variables matter?
Trigger.new,Trigger.old,Trigger.newMap,Trigger.oldMap, andTrigger.isInsert,isUpdate,isBefore,isAfterorTrigger.operationType.Trigger.oldisn't available on insert. - What is bulkification? Writing code that handles up to 200 records per trigger chunk with one query and one DML call per object: collect Ids into a Set, query once into a Map, process, then update a List after the loop. SOQL or DML inside a loop is the classic failure.
- SOQL vs SOSL? SOQL queries one object and its relationships with precise filters, like SQL SELECT; SOSL searches text across many objects at once, like a search box. Use SOSL for "find this string anywhere".
- How do relationship queries work? Child to parent with dot notation (
SELECT Name, Account.Name FROM Contact) and parent to child with a subquery (SELECT Name, (SELECT LastName FROM Contacts) FROM Account). Custom relationships use the__rsuffix. - with sharing, without sharing, inherited sharing?
with sharingenforces the running user's record access;without sharingignores it;inherited sharingtakes the caller's mode. None of them enforce object and field permissions; useWITH USER_MODEorSecurity.stripInaccessible()for those. - How much test coverage do you need? At least 75% org-wide Apex coverage to deploy to production, with every trigger covered and all tests passing. Strong teams go higher and assert behaviour rather than just running lines.
Intermediate Salesforce developer questions: 10–18
- Future vs Queueable vs Batch vs Schedulable?
@futurefor simple async work with primitive parameters; Queueable for complex types, a job Id and chaining; Batch Apex for large volumes in chunks (default scope 200, up to 2,000) with start, execute and finish; Schedulable to run at set times, often launching a batch. - How do you prevent trigger recursion? One trigger per object delegating to a handler class, a static Set of processed record Ids rather than a single static Boolean (which breaks when more than 200 records arrive in chunks), and logic that acts only when relevant fields actually change.
- Summarise the order of execution on save. System validation, before-save record-triggered flows, before triggers, custom validation and duplicate rules, save without commit, after triggers, assignment and auto-response rules, after-save flows, roll-up summary updates, commit, then post-commit work such as emails and async jobs.
- What is a mixed DML error? DML on setup objects (User, Group, PermissionSetAssignment) and other objects such as Account in one transaction raises MIXED_DML_OPERATION. Move one part into async Apex, or in tests wrap the setup DML in
System.runAs(). insertvsDatabase.insert(records, false)? The statement is all-or-nothing and throws on the first error;Database.insert(records, false)allows partial success and returnsSaveResultobjects to inspect. UseDatabase.setSavepoint()andDatabase.rollback()for custom control.- What do the LWC decorators do?
@apiexposes public properties and methods to a parent;@wirereads data reactively from Lightning Data Service or Apex methods marked@AuraEnabled(cacheable=true);@trackis now needed only to observe changes inside objects and arrays, since plain fields are reactive. - How do Lightning Web Components communicate? Parent to child through
@apiproperties and methods, child to parent withCustomEventanddispatchEvent(), and unrelated components through Lightning Message Service. - Wire vs imperative Apex calls?
@wirefor cached, reactive reads; imperative calls, such as importinggetXfrom@salesforce/apex/MyCtrl.getXand callinggetX({ recordId }).then(...), for DML, user-triggered actions or non-cacheable methods. Refresh wired data withrefreshApex. - What belongs in a good test class?
@isTest,@testSetupdata, no reliance on org data (SeeAllDatais false by default),Test.startTest()andTest.stopTest()for fresh limits and to run async work synchronously,HttpCalloutMockfor callouts, and real assertions with theAssertclass.
Experienced Salesforce developer questions: 19–27
- How do you keep SOQL selective on large objects? Filter on indexed fields (Id, Name, lookups, external IDs, custom indexes), avoid leading wildcards and negative operators, and check the Query Plan tool in the Developer Console for cost.
- How do you handle large data volumes? Batch Apex with a QueryLocator, custom indexes, archiving, Big Objects for history, the Bulk API for loads, and avoiding data skew, such as one parent record with a very large number of children or one user owning most records.
- Platform Events vs Change Data Capture? Platform Events are publish-subscribe messages you define and publish from Apex, flows or APIs; Change Data Capture publishes record changes automatically. Both decouple integrations, with subscribers such as triggers, flows and external clients using the Pub/Sub API.
- How do you design an outbound integration? Pick timing (real-time callout, async Queueable, events or Bulk API batches), keep endpoints and credentials in Named Credentials, make writes idempotent with external IDs and upsert, and respect callout limits: 100 per transaction and 120 seconds cumulative.
- Flow or Apex? Salesforce steers most automation to Flow. Use Apex for complex logic, tight bulk performance, fine-grained error handling or callouts, and expose it to flows with
@InvocableMethod. Strong answers mix both deliberately. - How do you enforce security in Apex? Sharing keywords for records;
WITH USER_MODEin SOQL,Database.query(soql, AccessLevel.USER_MODE)and user-mode DML such asinsert as user records;for object and field permissions;Security.stripInaccessible()to remove fields; bind variables against SOQL injection. - How do you deploy and version Salesforce code? Salesforce DX with the Salesforce CLI (
sf project deploy start), source control, scratch orgs or sandboxes, unlocked packages for modular code, and a CI pipeline that runs tests before deploying. Change sets exist but version nothing. - How do you debug a governor-limit error from production? Read the debug log or exception email for the limit and line, reproduce with the same data volume in a sandbox, look for queries or DML in loops, recursion, or other automation on the same object, and instrument with methods such as
Limits.getQueries(). - What recent platform changes should you know? User-mode database operations, the
Assertclass, Apex cursors for very large result sets (the limits table lists 50 million rows across cursors per transaction), and the move from legacy Workflow Rules and Process Builder to Flow. Check the release notes for the employer's current release.
Salesforce developer scenario and troubleshooting questions: 28–30
- A load of 10,000 accounts fails with "Too many SOQL queries: 101". A trigger or handler queries inside a loop. Refactor to collect Ids, query once into a Map, process in memory and update a List after the loop; add a test that inserts 200 or more records.
- Users see a field on a Lightning page that they shouldn't. Check field-level security in profiles and permission sets, then whether an Apex controller running in system mode returns the field. Switch the query to user mode or apply
Security.stripInaccessible(). - A Queueable chain stops halfway. Check Apex Jobs for failures and unhandled exceptions, remember that an executing Queueable can enqueue only one child job, and add a Transaction Finalizer to log the failure and retry.
How interviews test Salesforce development
| Round | What they ask | What a strong answer shows |
|---|---|---|
| Screen | Apex basics, governor limits, before vs after triggers | Limits named correctly and bulk thinking |
| Technical round | Write a bulkified trigger, a SOQL query, a small LWC | No queries or DML in loops, correct context variables |
| Scenario round | Limit errors, security gaps, failing async jobs | Debugging from logs to root cause |
| Senior round | Integration design, large data volumes, DevOps | Trade-offs between Flow, Apex, events and Bulk API |
Candidates commonly report writing a trigger and its test live, then being asked what happens with 10,000 records. Apex reads like Java, so Java interview questions help with syntax, and SQL interview questions help with query thinking, though SOQL has no joins in the SQL sense.
Where CoPilot Interview fits
CoPilot Interview is an AI interview assistant whose free AI mock interview builds Salesforce development questions from your résumé and the job description, reads them aloud and scores each spoken answer out of 10, which is a quick way to find the answers above that you can't yet explain without notes. The free plan gives 15 minutes a day of live help in sessions of up to 15 minutes, with AI mock interviews included. The browser demo at /try has 145 practice questions in 10 tracks with typed answers scored out of 10, no signup needed. Paid plans are Standard at $24.99 a month and Pro at $39.99 a month, and the desktop app runs on Windows 10 and 11 and macOS 12 or later. Technical screens, take-home tasks, online assessments and proctored tests usually forbid outside help, so prepare for those rather than use any tool during them; in any live interview, follow your employer's rules.
Disclosure: CoPilot Interview is our product, so weigh what we say about it accordingly.
Frequently asked questions
What are the most asked Salesforce developer interview questions?
Governor limits, bulkified triggers, before vs after triggers, SOQL vs SOSL, async Apex types, with sharing vs without sharing, LWC decorators, test classes and the order of execution.
What are Salesforce's main governor limits?
Per transaction: 100 synchronous SOQL queries, 150 DML statements, 50,000 rows retrieved, 10,000 rows processed by DML, 10 seconds of synchronous CPU time and 10 MB of synchronous heap, per the Apex Developer Guide on November 17, 2026.
Is Aura still asked about in interviews?
Sometimes, for orgs with older components, but Lightning Web Components are the default for new work. Know how the two interoperate.
How do I practise for a Salesforce developer interview?
Use a free Developer Edition org or Trailhead playground, build a trigger with a handler and tests, a Queueable integration and an LWC that calls Apex, then explain each design choice aloud.
Practice this interview before the real one
The AI mock interview builds questions from your resume and the job description, reads them aloud and scores each spoken answer out of 10. Included on the free plan.
Start a mock interview