Agentforce Batch ( Including Agent Script + Headless 360 ) : 27th July 2026, 8AM IST | Join Now! | Contact us for more info +91 - 709 7777 111
Welcome to SfdcIndia

Salesforce developer top 10 questions

  • Top 10 questions that commonly come up for a Salesforce developer with ~5 years of experience +
    Salesforce Developer Interview Prep

    Top 10 Salesforce Developer Interview Questions and Answers : 5 Years Experience

    The most frequently asked technical questions with clear, senior-level answer points covering Apex, Lightning Web Components, security, asynchronous processing and large data volumes.

              
    Apex and Platform Governor limits, trigger frameworks, order of execution and async Apex.
    UI and Security Lightning Web Components, component communication, sharing and security.
    Quality and Scale Test best practices, callout patterns and large data volume performance.
    01

    What are Governor Limits and how do you design around them?

    Question 1 of 1010%
     

    Key Concepts

    Multi-Tenant Architecture Bulkification Async Apex Limits Class

    Answer Points

    Per-transaction limits enforced due to multi-tenant architecture: 100 SOQL queries, 150 DML statements, 50,000 records via SOQL, 10,000 DML rows, heap 6MB sync / 12MB async.
    Bulkify code so every transaction can handle 200 records at once.
    Never place SOQL or DML inside loops; use Maps and Sets to aggregate operations.
    Offload heavy processing to asynchronous Apex such as Batch, Queueable or Future.
    Use the Limits class methods to monitor consumption in complex code paths.
    02

    Explain Trigger Frameworks and why you would use one

    Question 2 of 1020%
     

    Key Concepts

    One Trigger Per Object Handler Classes Recursion Control Custom Metadata Bypass

    Answer Points

    Enforce one trigger per object and move all logic into dedicated handler classes.
    Benefits include testability, maintainability and a predictable order of execution.
    Control recursion using static variables so update triggers do not re-fire endlessly.
    Allow enabling or disabling logic through Custom Metadata or custom settings, which is useful during data loads.
    Mention a pattern you have used, such as the TriggerHandler pattern or the fflib framework.
    03

    Future vs Queueable vs Batch vs Scheduled Apex : when do you pick each?

    Question 3 of 1030%
     

    Key Concepts

    Asynchronous Apex Job Chaining Database.Stateful Async Limits

    Answer Points

    Future: fire-and-forget with primitive parameters only, no chaining and no job ID; suitable for simple callouts.
    Queueable: accepts complex types, returns a job ID, supports chaining and allows callouts; the modern default over @future.
    Batch: processes large volumes up to 50 million records in chunks of up to 200 with start, execute and finish phases; use Database.Stateful to keep state.
    Scheduled: runs on a cron schedule and usually kicks off a Batch or Queueable job.
    Know the async limit: 250,000 executions per 24 hours or user licenses multiplied by 200, whichever is greater.
    04

    How does the Order of Execution work when a record is saved?

    Question 4 of 1040%
     

    Key Concepts

    Before and After Triggers Workflow Re-Fire Record-Triggered Flows Commit Boundary

    Answer Points

    System validation → before triggers → validation rules → duplicate rules.
    Record is saved but not committed → after triggers run.
    Assignment rules → auto-response rules → workflow rules, which can re-fire update triggers one more time.
    Escalation rules → after-save record-triggered flows → roll-up summary calculation on parents → sharing recalculation → commit.
    Post-commit logic such as emails and async jobs runs only after a successful commit.
    05

    SOQL vs SOSL : when would you use each?

    Question 5 of 1050%
     

    Key Concepts

    Structured Queries Text Search Index Selective Filters Indexed Fields

    Answer Points

    SOQL queries one object plus its relationships with precise filtering; it is the default choice for structured queries.
    SOSL performs text search across multiple objects and fields at once using search indexes and returns a list of lists.
    SOSL is best for global search style functionality when you do not know which object holds the text.
    SOSL is limited to 2,000 records per query.
    Mention selective queries and indexed fields as the key to performance in either case.
    06

    LWC vs Aura and how components communicate

    Question 6 of 1060%
     

    Key Concepts

    Web Standards @api and CustomEvents Lightning Message Service Lightning Data Service

    Answer Points

    LWC is built on modern web standards such as custom elements, ES modules and shadow DOM; it performs better and is the strategic direction, while Aura is the legacy framework.
    Parent to child communication uses public @api properties and methods.
    Child to parent communication uses CustomEvents.
    Unrelated components communicate through Lightning Message Service, which also bridges LWC, Aura and Visualforce.
    Use @wire for reactive data and Lightning Data Service to avoid Apex for simple CRUD; LWC can be embedded inside Aura but not the reverse.
    07

    What sharing and security mechanisms exist, and how do with sharing / without sharing work?

    Question 7 of 1070%
     

    Key Concepts

    OWD and Role Hierarchy Permission Sets Sharing Keywords User Mode Operations

    Answer Points

    Record access layers: org-wide defaults → role hierarchy → sharing rules → manual sharing → team and territory sharing.
    Object and field access is controlled by profiles and permission sets, with permission sets being the recommended approach today.
    with sharing enforces record-level sharing rules, without sharing ignores them and inherited sharing takes the caller's context.
    Sharing keywords do not enforce object or field security; use WITH SECURITY_ENFORCED, Security.stripInaccessible() or Schema describe checks for that.
    Mention user mode database operations with AccessLevel.USER_MODE as the modern approach.
    08

    How do you make a callout from a trigger when callouts are not allowed in triggers?

    Question 8 of 1080%
     

    Key Concepts

    Database.AllowsCallouts @future(callout=true) Platform Events Idempotency and Retries

    Answer Points

    Synchronous callouts are blocked in trigger context because the transaction holds database locks.
    The solution is asynchronous: enqueue a Queueable that implements Database.AllowsCallouts, which is the preferred approach.
    @future(callout=true) is the older alternative for simple cases.
    For scale, consider Platform Events or Change Data Capture with an asynchronous subscriber.
    Senior points: handle partial failures, implement retries and store external IDs for idempotency.
    09

    What are best practices for Apex test classes?

    Question 9 of 1090%
     

    Key Concepts

    Meaningful Assertions @testSetup Test.startTest / stopTest Test Data Factory

    Answer Points

    75% minimum coverage is required to deploy, but focus on meaningful assertions rather than coverage alone.
    Use @testSetup for shared test data and create your own data instead of relying on SeeAllData=true.
    Test bulk scenarios with 200 records plus positive, negative and boundary cases.
    Use Test.startTest() and Test.stopTest() to reset governor limits and force async code to run.
    Mock callouts with HttpCalloutMock, use System.runAs() for permission testing and maintain a Test Data Factory class.
    10

    How do you handle Large Data Volumes and query performance?

    Question 10 of 10100%
     

    Key Concepts

    Selective Queries Custom Indexes Skinny Tables and Big Objects Data Skew

    Answer Points

    Write selective queries that filter on indexed fields: Id, Name, lookup fields, external IDs and custom indexes requested through Salesforce support.
    Avoid negative operators and leading wildcards because they prevent index usage.
    Use skinny tables, Batch Apex with Database.QueryLocator, Big Objects and archiving strategies for very large tables.
    Avoid data skew: more than around 10,000 child records under one parent or one owner holding too many records causes locking issues.
    Attach a real project example, such as resolving a row lock issue caused by account data skew.
    Interview Tip

    At 5 years of experience, interviewers care less about definitions and more about trade-offs and real project stories. Attach a one-line example from your own work to every answer, and be ready for follow-ups on integration patterns, DevOps with SFDX and CI/CD, and a live Apex or SOQL exercise.