Salesforce Developer Interview Questions and Answers

Salesforce developer interviews in 2026 test whether you can ship production-safe platform code—bulkified Apex, selective SOQL, secure LWC data access, and sound async choices—not whether you can recite every declarative tool from Trailhead. Interviewers often show a trigger or loop and ask what breaks at 200 records on Monday morning in production.

Below are 40+ Salesforce developer interview questions and preparation topics covering platform fundamentals, Apex, triggers, async processing, SOQL, Lightning Web Components, integrations, security, testing, and senior scenarios. Open each answer after you try the question yourself. For data pipeline / Data Cloud / warehouse roles, use the Salesforce Data Engineer interview guide instead—different role, different prep.

NOTE
Prep target: Answer each technical question aloud first, then read What interviewers are testing: to understand the hidden evaluation criterion. Use the explanation to learn the mechanism or trade-off, then compare your response with A strong answer is: Practice Flow vs Apex, bulkification, one LWC data flow, and at least two production scenarios aloud.

Interview context and how to prepare

What does a Salesforce (SFDC) developer own in 2026?

What interviewers are testing: Whether you understand the developer boundary across Apex, LWC, automation, data access, integrations, testing, and release ownership—not whether you can list Salesforce products.

A Salesforce developer builds and maintains custom behavior on the platform—Apex, triggers, LWC, integrations, and the declarative/programmatic boundary—not only clicking through setup.

Typical ownership:

Area Examples
Server-side Apex classes, triggers, batch/queueable, invocable actions
UI Lightning Web Components, Flexipages, quick actions
Data access SOQL/SOSL, DML, security-aware queries
Automation Record-triggered Flow vs Apex decisions
Integration REST callouts, platform APIs, Named Credentials
Quality Unit tests, deployments, governor-limit-safe design

Not the same as Data Engineer: Pipeline/SQL/Data Cloud depth lives in the data engineer interview guide.

A strong answer is:

A Salesforce developer builds and maintains custom behavior on the platform—Apex, triggers, LWC, integrations, and the declarative/programmatic boundary—not only clicking through setup.

What is a typical Salesforce developer interview loop?
Round Duration Focus
Recruiter / HM screen 30 min Background, certs, project types
Platform fundamentals 45–60 min Objects, relationships, governor limits, declarative vs code
Apex / triggers 45–60 min Bulkification, order of execution, async
LWC / UI 30–45 min Components, @wire, LDS, performance
Integration / security 30–45 min Callouts, Named Credentials, sharing, FLS
Live exercise 45–90 min Fix bulk bug, write trigger handler, small LWC
Behavioral 30 min Ownership, incidents, stakeholder conflict

Indian SI vs product company: Services firms may weight declarative/admin knowledge more; product teams often go 70%+ code (Apex, LWC, integration).

A strong answer is:

"I expect platform fundamentals first, then Apex and trigger design, LWC, integrations and security, and usually a live or scenario exercise. Senior loops add architecture, production incidents, release decisions, and stakeholder trade-offs."

What is a realistic 4–6 week SFDC developer prep plan?
Week Focus Output
1 Data model, relationships, SOQL, governor limits Explain selective queries + limits from memory
2 Apex bulkification, triggers, handler pattern Refactor a SOQL-in-loop example
3 Async (queueable, batch, schedulable) + tests Write bulk test with Test.startTest
4 LWC: @wire, imperative Apex, events Build one list + detail component
5 Integrations, security, Flow vs Apex scenarios Diagram callout + Named Credential flow
6 Mocks + deployment + behavioral STAR Two timed verbal walkthroughs

Hands-on: use a Developer Edition or scratch org; complete relevant Trailhead trails, but prioritize writing code over badge count.

Cross-skill: Java interview basics help with Apex OOP; Git for Salesforce DX workflows.

A strong answer is:

"I spend the first two weeks on SOQL, limits, and bulk Apex, then add async processing, LWC, integrations, security, and mocks. I prioritize coding in an org over collecting Trailhead badges."

When do you choose declarative tools vs programmatic development?

What interviewers are testing: Whether you choose Flow or code from maintainability, transaction complexity, expected volume, testability, and ownership rather than personal preference.

Choose declarative (Flow, layouts, custom objects) Choose Apex / LWC
Straightforward record automation Complex branching, recursion guards
Admins should maintain after you leave Heavy iteration / aggregation at volume
Fast iteration, upgrade-friendly patterns Complex integration/callout orchestration
Standard UX is enough Custom UI performance or behavior

2026 default: Record-triggered Flow for maintainable automation; Apex when CPU, bulk, callouts, or test complexity demand code.

A strong answer is:

"I prefer Flow for straightforward, admin-maintainable automation. I choose Apex when volume, CPU, transaction control, complex reusable logic, or integration requirements make programmatic control safer and easier to test."

What extra bar do senior SFDC developer interviews add?

What interviewers are testing: whether you demonstrate solid command of production judgment—the trap is textbook recall without production context.

Seniors are judged on production judgment, not syntax alone:

  • Bulk-safe design before the first deploy
  • Trigger framework and recursion control
  • Security: understand API-version-dependent Apex access modes, explicit WITH USER_MODE / WITH SYSTEM_MODE, sharing boundaries, and stripInaccessible() where graceful degradation is needed
  • Async selection with operational ownership
  • LWC performance (wire vs imperative, list virtualization)
  • Integration contracts and credential hygiene
  • Agentforce / invocable Apex awareness in 2026
  • Mentoring, code review, release discipline

A strong answer is:

"Senior Salesforce developers are expected to defend architecture choices: bulk behavior, automation ownership, security boundaries, async design, integration failure handling, testing, and release safety—not merely write valid Apex."


Platform fundamentals

What are governor limits? Give examples that matter in production.

What interviewers are testing: Whether you can connect governor limits to concrete design choices such as bulk queries, collection-based DML, bounded CPU work, and transaction boundaries.

Governor limits cap per-transaction resource use on the multitenant platform so one org cannot starve others.

Limit (sync context) Typical cap Interview pain point
SOQL queries 100 SOQL inside loops
DML statements 150 DML per record in trigger
CPU time 10,000 ms Heavy loops, regex, bad aggregation
Heap 6 MB Large in-memory collections
Callouts 100 per transaction Excess callouts; uncommitted-work ordering

Key concept: Governor limits apply to an execution transaction. Trigger work performed during the original save shares that transaction's limits; asynchronously started Queueable or Batch executions run in separate transactions with their own applicable limits.

A strong answer is:

Governor limits enforce fair multitenant usage. I design bulk collections, one query per object per transaction, and async when sync limits are insufficient.

Explain lookup, master-detail, and self-relationship.

What interviewers are testing: whether you define lookup, master-detail, and self-relationship. and connect it to Lookup in production—not textbook definitions only.

Type Behavior Interview note
Lookup Optional parent; child keeps own sharing Rollups need Apex/Flow
Master-detail Required parent; child sharing follows master Roll-up summary fields allowed
Self Same object parent/child Hierarchy, manager chains

SOQL impact: Child-to-parent uses dot notation (Contact.Account.Name). Parent-to-child uses subquery (SELECT Id, (SELECT Id FROM Contacts) FROM Account)—subquery rows count toward query limits.

A strong answer is:

Lookup is optional with independent sharing; master-detail is tightly coupled with rollup support. I pick based on lifecycle, sharing, and whether native rollups are required.

What is the Salesforce release model?

What interviewers are testing: whether you define the Salesforce release model and connect it to three major releases per year in production—not textbook definitions only.

Salesforce ships three major releases per year (Spring, Summer, Winter). Sandboxes preview releases weeks before production.

Developer implications:

  • Regression-test triggers, Flows, and LWC in preview sandboxes
  • Watch release notes for governor limit, API, and security changes
  • Deprecations (Workflow Rules, Process Builder → Flow) affect migration planning

A strong answer is:

Three seasonal releases; I validate custom code in preview sandboxes and read release notes for breaking changes before production cutover.

What is the order of execution for a record save?

What interviewers are testing: Whether you understand enough of the save lifecycle to predict when Flow and Apex run, diagnose recursion/double updates, and assign one automation owner to each responsibility.

At a high level:

  1. Initial system validation
  2. Before-save record-triggered Flows
  3. Before Apex triggers
  4. Custom validation and duplicate processing
  5. Record write to the database
  6. After Apex triggers
  7. Assignment/auto-response rules and any applicable legacy workflow automation
  8. After-save record-triggered Flows and later actions

Salesforce documents before-save flows as running immediately before Apex before triggers. The full sequence has additional steps, so for production debugging I consult Salesforce's current Order of Execution reference rather than memorizing every intermediate rule type.

Why seniors care: Duplicate automation (Flow + trigger) causes recursion, double updates, and CPU timeouts.

Pattern: One trigger per object → handler class; consolidate Flow vs Apex ownership per object/event.

A strong answer is:

Validation and before-save flows precede before triggers; after triggers precede after-save flows. I avoid duplicate automation paths that recurse or fight over the same fields, and I verify the exact sequence against current Salesforce docs when debugging production saves.

What is the difference between org-wide defaults, roles, and sharing rules?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

Mechanism Purpose
OWD Baseline/default record access before hierarchy and sharing mechanisms grant more access
Role hierarchy Managers access subordinates' records (when private)
Sharing rules Grant extra read/write beyond OWD
Manual sharing Record-level exceptions

In API 67.0+, an Apex class with no sharing declaration defaults to enforcing sharing. Salesforce still recommends explicitly declaring the intended sharing model for maintainability across API versions. Database operations also default to user mode, which enforces the running user's object permissions, FLS, and record-level access. Triggers remain system-mode entry points, so security-sensitive trigger logic should be delegated to classes where access mode and sharing behavior are explicit.

A strong answer is:

"OWD establishes baseline record access; role hierarchy and sharing mechanisms open access from there. In current Apex I make sharing and database access mode explicit, and I remember triggers still run in system mode."


Apex, bulkification, and triggers

What is bulkification? Show non-bulkified vs bulkified thinking.

What interviewers are testing: whether you show collection-based DML and SOQL—not SOQL or DML inside a loop.

Bulkification means writing triggers and Apex to handle up to 200 records per transaction without per-record SOQL/DML.

apex
// WRONG: SOQL in loop — fails at scale
for (Opportunity o : Trigger.new) {
    Account a = [SELECT Industry FROM Account WHERE Id = :o.AccountId];
    if (a.Industry == 'Technology') o.Description = 'Tech deal';
}

// RIGHT: query once, map, loop
Set<Id> accountIds = new Set<Id>();
for (Opportunity o : Trigger.new) accountIds.add(o.AccountId);
Map<Id, Account> accountsById = new Map<Id, Account>(
    [SELECT Id, Industry FROM Account WHERE Id IN :accountIds]
);
for (Opportunity o : Trigger.new) {
    Account a = accountsById.get(o.AccountId);
    if (a != null && a.Industry == 'Technology') o.Description = 'Tech deal';
}

The bulk pattern mirrors standard collection processing—you query once, build a map, then iterate.

A strong answer is:

Bulkification collects ids, runs one query and one DML batch per object where possible, and never puts SOQL or DML inside a loop over trigger records.

Before vs after triggers—when do you use each?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

Trigger timing Use for
Before insert/update Validate, default fields, same-record calculation
After insert/update/delete Related record updates, async enqueue, logging

Undelete: after undelete for recovery workflows.

Handler pattern:

apex
trigger OpportunityTrigger on Opportunity (before insert, before update, after update) {
    OpportunityTriggerHandler.handle(Trigger.operationType, Trigger.new, Trigger.oldMap);
}

A strong answer is:

Before triggers for same-record validation and defaults; after triggers for related updates and async work. I keep one trigger per object delegating to a handler class.

How do you prevent trigger recursion?

What interviewers are testing: Whether you prevent recursive work without accidentally suppressing legitimate records or later trigger invocations in the same transaction.

Common techniques:

Technique When
Static Set/Map of processed record IDs or operation state Guard specific re-entry without disabling all later processing
Trigger framework Central dispatcher and bypass controls
Custom metadata bypass Controlled migrations/data loads
Consolidate automation Remove Flow/Apex ownership conflicts

A single static Boolean is easy to demonstrate but is often too coarse for production recursion control.

Interview trap: A Flow updates a field that re-fires the trigger—fix ownership, not only a flag.

A strong answer is:

I use a handler framework with re-entry guards, metadata bypass for loads, and eliminate duplicate Flow/trigger paths that cause recursion.

What is an Apex interface and why use one?

What interviewers are testing: whether you define an Apex interface and why use one and connect it to without implementation in production—not textbook definitions only.

Interfaces declare methods without implementation—classes promise to implement them.

Common examples:

  • Database.Batchable<SObject> for batch jobs
  • Queueable for async jobs
  • Schedulable for cron-style runs
  • Custom interfaces for strategy pattern / test doubles

A strong answer is:

Interfaces define contracts—platform interfaces like Batchable or custom seams for swappable implementations and cleaner tests.

What is required to deploy Apex to production?

What interviewers are testing: whether you define required to deploy Apex to production and connect it to compiles in production—not textbook definitions only.

Production deployment gates:

  1. Successful validation under the selected deployment test level
  2. ≥ 75% aggregate Apex code coverage
  3. Every trigger must have some test coverage
  4. All Apex compiles

Senior point: Coverage is not quality—write bulk tests with edge cases, not empty Test.startTest stubs.

A strong answer is:

Production needs 75% coverage, passing tests, and compiled code. I write meaningful bulk tests—not coverage-padding no-ops.

Scenario: record-triggered automation for complex Opportunity rules—Flow or Apex?

What interviewers are testing: Whether you evaluate Flow vs Apex from expected record volume, complexity, ownership, callout/transaction boundaries, observability, and testing—not from a blanket "declarative first" rule.

Clarify requirements:

  • How many objects touched per save?
  • Need synchronous callout?
  • Expected volume (bulk)?
  • Who maintains after launch?
Signal Lean
Simple field updates, admin ownership Flow
Multi-object aggregation, recursion risk Apex handler
Callout on save Apex (or async Flow pattern)
Heavy CPU at 200 rows Apex bulk handler

A strong answer is:

I start with Flow when rules are simple and admin-maintainable. I move to a bulkified Apex handler when CPU, recursion, callouts, or complex tests demand code.


Asynchronous Apex

Queueable vs Batch vs Schedulable—when do you use each?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

Type Best for Limits / traits
Queueable Small async jobs, callouts, chaining Supports chaining; control retry/chain depth and avoid runaway jobs that consume async capacity
Batch Apex Large data sets processed as separate transactions Default scope is typically 200 and can be configured within platform limits
Schedulable Cron-style timing Often launches batch/queueable
apex
// Queueable: async callout after DML
public class SyncJob implements Queueable, Database.AllowsCallouts {
    public void execute(QueueableContext ctx) { /* callout */ }
}

Rule: DML then callout in same sync transaction fails—use @future, Queueable, or callout from batch with AllowsCallouts.

A strong answer is:

Queueable for smaller async work and callout chains; Batch for large data volumes; Schedulable to kick off jobs on a schedule.

@future vs Queueable—why prefer Queueable in modern Apex?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

@future Queueable
Monitoring Limited Job ID, chaining
Complex payloads Primitive args only Pass sObject lists
Callouts Separate methods Database.AllowsCallouts on class

A strong answer is:

Queueable is generally preferred for new asynchronous Apex because it provides richer payloads, job IDs, chaining, and newer controls. @future remains available for simpler existing use cases.

Scenario: update 2 million Contact records nightly—design approach.

What interviewers are testing: whether you walk through a structured approach to update 2 million contact records nightly—design approach.—naming checks before fixes.

  1. Batch Apex implementing Database.Batchable<Contact>
  2. Selective query on indexed fields (LastModifiedDate, status flag)
  3. Stateful only if aggregating across chunks (watch heap)
  4. Schedulable wrapper for nightly cron
  5. Governor-safe execute: choose an appropriate batch scope; 200 is a common starting point, not a requirement; no SOQL in loop
  6. Error handling: partial success logging, email on failure
  7. Use a narrow, auditable automation bypass only when the data-maintenance process explicitly requires it; do not disable validation/business logic indiscriminately

A strong answer is:

Nightly Batch with selective SOQL, bulk execute logic, schedulable entry point, error logging, and optional trigger bypass for controlled data fixes.

Why can you not do a callout after DML in the same transaction?

What interviewers are testing: Whether you recognize the uncommitted-work transaction boundary and can redesign integration work asynchronously without losing retry/idempotency guarantees.

Platform rule: callout after DML in the same sync transaction throws CalloutException unless using proper async separation.

Fix patterns:

  • Queueable with Database.AllowsCallouts enqueued after DML
  • @future(callout=true) (legacy)
  • Batch with callouts in execute (mind limits)

A strong answer is:

"I avoid holding uncommitted Salesforce work while making an external call. If the workflow requires DML first, I separate the callout into an asynchronous transaction such as Queueable and design retry/idempotency around the external operation."


SOQL, SOSL, and data access

SOQL vs SOSL—when do you use each?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

SOQL SOSL
Purpose Query known object(s) with filters Text search across objects
Example Open Opportunities this quarter Global search "Acme" across Account/Contact/Case
Limits 100 queries/sync txn 20 SOSL/sync txn; 2,000 results

A strong answer is:

SOQL for structured filters on known objects; SOSL for cross-object search using the search index—not leading-wildcard SOQL hacks.

What makes a SOQL query selective?

What interviewers are testing: Whether you think about production data volume and query plans instead of assuming every indexed field automatically makes a SOQL query selective.

On large objects, non-selective queries fail or time out.

Selective filters:

  • Indexed fields: Id, Name, external IDs, audit fields, custom indexed fields
  • Selectivity depends on index type, object cardinality, filter operators, and optimizer statistics. Instead of memorizing one percentage threshold, use the Query Plan and verify that filters can use a selective index at production volume

Avoid: leading % wildcards, !=, NOT, non-deterministic formula filters at scale.

Tool: Query Plan in Developer Console.

A strong answer is:

Filter on indexed fields returning a small row fraction. I check the Query Plan when a query works in sandbox but fails in production volume.

How do you prevent SOQL injection?

What interviewers are testing: whether you follow a practical ordered approach with the right tools—not a vague tool list.

apex
// UNSAFE
String q = 'SELECT Id FROM Account WHERE Name = \'' + userInput + '\'';

// SAFE: bind variable
String name = userInput;
List<Account> rows = Database.query(
    'SELECT Id FROM Account WHERE Name = :name'
);

For dynamic field names: whitelist via Schema.describe—never trust raw user strings.

A strong answer is:

Bind variables first; escape only when binding is impossible; whitelist dynamic field/object names from Schema describe.

What is WITH USER_MODE in SOQL (2026 security)?

What interviewers are testing: Whether you understand the current Apex user/system-mode model and how class sharing declarations interact with database access mode.

In API 67.0+, Apex database operations default to user mode, enforcing the running user's object permissions, FLS, and record-level access. WITH USER_MODE can still make that intent explicit. WITH SYSTEM_MODE deliberately elevates the database operation. Class with sharing / without sharing remains important for the broader class execution and sharing context.

Related tools:

  • WITH USER_MODE / explicit user-mode database operations
  • Security.stripInaccessible() — removes inaccessible fields when graceful degradation is desired
  • Explicit system mode only when justified

WITH SECURITY_ENFORCED has been retired for API 67.0 code and does not compile in API 67+.

A strong answer is:

"In API 67+, database operations default to user mode for object permissions, FLS, and record access. I still state access mode explicitly in security-sensitive code, use stripInaccessible() when graceful degradation is required, and opt into system mode only for a deliberate privileged operation."


Lightning Web Components (LWC)

LWC vs Aura—what do you say in 2026 interviews?

What interviewers are testing: whether you state clear distinctions and when each option applies—not interchangeable buzzwords.

LWC Aura
Status Default for new UI Legacy maintenance
Model Web standards, lightweight Heavier proprietary framework
Performance Generally better Often slower bundles

Answer: Build new with LWC; use Aura only for unsupported interop or legacy wrap.

A strong answer is:

LWC is the default for new development. I maintain Aura where needed but migrate or wrap with LWC when possible.

@wire vs imperative Apex in LWC?

What interviewers are testing: Whether you distinguish reactive wired Apex from explicitly invoked Apex and understand the caching/refresh behavior rather than equating @wire with Lightning Data Service.

@wire Apex Imperative Apex
Invocation Reactive; framework invokes when parameters change Explicitly called by component code
Cacheability Wired Apex method must be cacheable=true; framework may serve cached results Can call cacheable reads or non-cacheable mutations
Use Reactive read/query data User-driven actions, writes, explicit control

Refresh strategy depends on the data source—for example refreshApex() for wired Apex data and LDS notification APIs when records changed outside LDS.

javascript
import { wire } from 'lwc';
import getOpps from '@salesforce/apex/OpportunityController.getOpen';

@wire(getOpps, { accountId: '$recordId' })
wiredOpps;

A strong answer is:

"I use @wire for reactive reads from cacheable=true Apex methods. I use imperative calls when execution must be explicit, including mutations; imperative reads can also call cacheable Apex methods."

What is Lightning Data Service (LDS)?

What interviewers are testing: whether you define Lightning Data Service (LDS) and connect it to UI API wire adapters in production—not textbook definitions only.

LDS provides UI API wire adapters (getRecord, updateRecord, etc.) for CRUD on records without custom Apex when needs are simple.

Benefits: automatic cache sharing across components, built-in FLS/CRUD respect.

Use Apex when: multi-object joins, complex logic, callouts, or bulk server processing.

A strong answer is:

LDS handles simple record CRUD with caching and security. I add Apex when queries or business logic exceed what LDS adapters support.

How do you expose Apex to LWC securely?

What interviewers are testing: Whether you treat an LWC-accessible Apex method as a server-side security boundary and enforce class access, record sharing, object/field permissions, and input validation there.

  1. Expose only required methods with @AuraEnabled; ensure users have Apex class access
  2. Make the class sharing model explicit even though API 67 entry-point behavior is safer by default
  3. Use explicit user-mode database operations where user permissions must apply; opt into system mode only intentionally
  4. Use stripInaccessible() where graceful field filtering is desired
  5. Validate all untrusted client input server-side

Authenticated and guest users can invoke an @AuraEnabled method only when their profile or permission set grants access to the Apex class.

A strong answer is:

AuraEnabled methods with explicit sharing and access mode, stripInaccessible where needed, and server-side validation—client controls are UX only, not security.

Scenario: LWC list feels slow with thousands of rows.

What interviewers are testing: whether you walk through a structured approach to lwc list feels slow with thousands of rows.—naming checks before fixes.

Tactics:

  • Paginate or virtualize—do not render 5,000 DOM rows
  • Use @wire with narrow field lists
  • Server-side filters; selective SOQL
  • Avoid @track on deep objects unnecessarily (modern reactivity is finer-grained)
  • Lazy load details on row expand
  • Check for N+1 imperative calls per row

A strong answer is:

Paginate or virtualize large lists, minimize fields, filter server-side, and eliminate per-row Apex calls—same spirit as bulkification on the server.


Integrations and platform APIs

How do you call external REST APIs from Salesforce?

What interviewers are testing: Whether you separate endpoint/authentication configuration from Apex business logic and design callouts around transaction, retry, timeout, and credential boundaries.

Pattern:

  1. Named Credential defines the callout endpoint and references an External Credential for authentication
  2. HttpRequest / Http class in Apex
  3. Parse JSON with JSON.deserialize
  4. Run async if DML is involved in same business transaction
apex
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:My_Named_Credential/resources');
req.setMethod('GET');
HttpResponse res = new Http().send(req);

Never hard-code credentials, tokens, or secrets in Apex or source control. Use Named Credentials and External Credentials for endpoint authentication; use Custom Metadata for non-secret configuration.

A strong answer is:

Named Credentials for endpoints and External Credentials for auth, Http classes for callouts, async when DML and callouts mix, and no hard-coded secrets in Apex.

How do Salesforce and external systems integrate?

What interviewers are testing: whether you demonstrate solid command of REST / Bulk / Composite APIs—the trap is textbook recall without production context.

Method Use
REST / Bulk / Composite APIs External systems read/write Salesforce data
Change Data Capture External consumers react to Salesforce record changes
Platform Events Decoupled event-driven integration between Salesforce and other systems
OAuth / External Client Apps / Connected Apps Authentication and API authorization

Data engineers often consume the same CRM objects via API or CDC—see data engineer guide for pipeline angle.

A strong answer is:

External systems use REST/Bulk APIs with OAuth, or subscribe to CDC and Platform Events for push models—I design idempotent upserts and respect API limits.

Why use Named Credentials?

What interviewers are testing: whether you know when to reach for this and the failure modes when you pick the wrong approach.

Named Credentials define the callout endpoint and reference authentication configuration. External Credentials model the authentication protocol, principals, and user mappings. Together they keep endpoint and auth details out of Apex and source code.

A strong answer is:

Named Credentials plus External Credentials hide secrets and simplify callout code—I avoid credentials in Apex source or Git history.


Security and configurable development

How do you enforce Field-Level Security in Apex?

What interviewers are testing: Whether you understand current user-mode database operations and know when to fail on inaccessible data versus strip inaccessible fields gracefully.

Options:

  • User-mode SOQL/DML (the API 67+ default—enforces CRUD, FLS, and record-level access; make it explicit when clarity matters)
  • WITH USER_MODE / database user-mode APIs
  • Security.stripInaccessible(AccessType.READABLE, records) when inaccessible fields should be removed gracefully
  • Explicit WITH SYSTEM_MODE / system-mode DML only for deliberate privileged operations

A strong answer is:

I enforce FLS in queries and DML via user-mode operations and stripInaccessible—not only UI hiding fields.

When is it acceptable to use without sharing?

What interviewers are testing: Whether you distinguish class sharing context from database access mode and understand that user-mode operations enforce CRUD, FLS, and record access together.

Only for narrow system processes—batch cleanup, integration user jobs, controlled admin utilities—with:

  • Separate service classes (not entire app)
  • Audit logging
  • Input validation
  • Documented business approval

Classes now enforce sharing by default in API 67+, but Salesforce still recommends making the sharing declaration explicit for maintainability across API versions. Use without sharing only when bypassing record sharing is an intentional, reviewed requirement. without sharing establishes a system sharing context for the class, but an explicitly user-mode query or DML operation still enforces the user's CRUD, FLS, and record access. Conversely, explicit system-mode database access can elevate that operation. Treat class sharing and database access mode as related security controls whose interaction must be intentional.

A strong answer is:

without sharing only for isolated system jobs with audits and tight scope—never as the default for user-driven features.

What are Custom Metadata Types?

What interviewers are testing: whether you define Custom Metadata Types and connect it to metadata records in production—not textbook definitions only.

Developer-defined metadata records deployed with the app—config without hard-coding.

Uses: field mappings, strategy/configuration switches, integration mappings, and deployable environment configuration.

Unlike Custom Settings, metadata is deployable and version-friendly in DX pipelines.

A strong answer is:

Custom Metadata stores configurable app behavior in version-controlled metadata—ideal for mappings and feature toggles across environments.

Roll-up summary on lookup—options?

What interviewers are testing: whether you demonstrate solid command of master-detail—the trap is textbook recall without production context.

Native roll-up summary fields require master-detail. For lookup relationships:

  • Flow rollups (record-triggered)
  • Apex trigger aggregation
  • Third-party rollup tools

Trade-off: trigger/Flow must stay bulk-safe.

A strong answer is:

Native rollups need master-detail; for lookup I use bulkified Apex or Flow—and watch governor limits on high-volume parents.


Testing, deployment, and Agentforce

How do you write meaningful Apex tests?

What interviewers are testing: whether you follow a practical ordered approach with the right tools—not a vague tool list.

Practice Why
Test.startTest / Test.stopTest Exercise async governor context
Bulk data (200 rows) Prove trigger bulkification
Test.loadData / factories Repeatable fixtures
Mock callouts HttpCalloutMock
Assert outcomes Not just coverage %
apex
@IsTest
static void bulkUpdate_setsDescriptionForTechAccounts() {
  // insert 200 opps + accounts
  Test.startTest();
  update opps;
  Test.stopTest();
  System.assertEquals(200, [SELECT COUNT() FROM Opportunity WHERE Description = 'Tech deal']);
}

A strong answer is:

I test bulk behavior, async boundaries, and assertions—not empty tests that only chase 75% coverage.

How do you test LWC?

What interviewers are testing: whether you follow a practical ordered approach with the right tools—not a vague tool list.

Use Jest with Salesforce's LWC testing utilities for component unit tests (@salesforce/sfdx-lwc-jest):

  • Mock @salesforce/apex imports
  • Test user interactions and conditional rendering
  • Complement with Selenium/Playwright for critical E2E flows

A strong answer is:

Jest unit tests with mocked Apex for component logic; selective E2E for critical user journeys.

How do developers support Agentforce in 2026?

What interviewers are testing: Whether you design agent-callable actions as secure, deterministic application contracts rather than exposing arbitrary Apex methods to an AI layer.

Developers expose trusted actions Agentforce can invoke:

Piece Developer role
Invocable Apex Safe, bulk-aware actions with validation
Flows Orchestrated automation surfaces
Security Least privilege for integration users
Testing Action unit tests + negative cases

A strong answer is:

I build invocable, bulk-safe, well-tested actions with clear inputs/outputs and secure data access—agents are only as good as the platform code behind them.


Behavioral and final checklist

Tell me about a governor-limit or production bug you fixed.

What interviewers are testing: whether you give a structured narrative with decisions and trade-offs—not a bullet list without context.

STAR example angles:

  • SOQL-in-loop trigger taking down Monday imports
  • CPU timeout from recursive Flow + trigger
  • Callout-after-DML failure in integration

Structure: impact → root cause → bulk/async fix → regression test → monitoring.

A strong answer is:

I describe the limit error, traced it to per-record SOQL, refactored to maps and bulk queries, added a 200-row test, and watched limit dashboards after deploy.

Admin wants Flow; you want Apex—how do you decide?

What interviewers are testing: Whether you resolve a Flow-vs-Apex disagreement using requirements, ownership, expected scale, risk, and evidence rather than seniority or tool preference.

  1. Clarify maintenance owner and change frequency
  2. Estimate volume and limit risk
  3. Prototype both if cheap
  4. Document decision in ADR or team wiki
  5. Choose the simplest maintainable implementation that meets the expected volume, complexity, ownership, and observability requirements; establish measurable thresholds that would justify revisiting the design

A strong answer is:

I decide on maintainability, volume, and limit risk—not preference—I make trade-offs visible and pick Flow when admins can safely own it.

Why Salesforce development as a career?

What interviewers are testing: Whether your motivation connects naturally to platform development, customer/business impact, continuous learning, and the type of engineering work the role actually involves rather than certification or salary alone.

Connect to:

  • Platform scale and continuous releases
  • Mix of declarative + code problem solving
  • Customer impact on sales/service workflows
  • Ecosystem demand for LWC + integration skills

Tie to Trust (security, data handling) if interviewing at Salesforce.

A strong answer is:

I enjoy shipping business-critical features on a managed platform where good design—bulk Apex, secure LWC, solid tests—directly protects customer data and uptime.

Do certifications matter in developer interviews?

What interviewers are testing: Whether you treat certifications as evidence of baseline platform knowledge while recognizing that coding, debugging, architecture judgment, and production experience are stronger engineering signals.

Certs (Platform Developer, JS Developer, Architect paths) signal baseline knowledge but do not replace hands-on org experience.

Interviewers still ask you to read code, design triggers, and explain limits.

A strong answer is:

Certs help show foundation; I pair them with real projects where I deployed bulk-safe code and integrations—not badge collecting alone.

How do you debug Apex in practice?

What interviewers are testing: whether you follow a practical ordered approach with the right tools—not a vague tool list.

Tool Use
Debug logs Trace execution, exceptions, SOQL/DML and limit consumption
Apex Replay Debugger Replay a captured debug log in VS Code
Checkpoints / heap inspection Capture state at selected execution points where supported
Limits methods/log summary Inspect CPU, heap, SOQL, DML and related consumption

A strong answer is:

Debug logs for production-like issues; Replay Debugger locally—I always check the limit usage section of the log.


Final-week Salesforce developer interview checklist

Technical:

  • Explain governor limits and bulkification with a before/after example
  • Draw order of execution and where your trigger fits
  • Compare queueable vs batch with one scenario each
  • SOQL vs SOSL, selective queries, bind variables
  • @wire vs imperative, LDS vs Apex in LWC
  • Named Credentials, callout-after-DML rule
  • with sharing, USER_MODE / stripInaccessible
  • 75% tests + bulk test example

Behavioral: Two STAR stories—production limit fire, Flow vs Apex decision.


Pattern cheat sheet (quick reference)

Topic Remember
Governor limits No SOQL/DML in loops
Triggers One trigger → handler class
Async Queueable for small; Batch for millions
Callouts after DML Separate into an async transaction
SOQL injection Bind variables; whitelist dynamic identifiers
Data security User-mode access by default in API 67+; elevate deliberately
LWC reads @wire + cacheable Apex
LWC writes Imperative Apex
Deploy 75% coverage, all tests green
Flow vs Apex Maintenance + volume + limits

On-site Salesforce developer interview prep


References

Official Salesforce

Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with more than 15 years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, networking, and security, delivering robust and efficient solutions for diverse projects.

  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security
  • Cloud Computing
  • Kubernetes
  • Linux
  • Ansible (software)