A concise study guide: 100 scenario-driven Salesforce developer questions with practical answers, code patterns, and best practices to help you prepare for real interviews in 2025.
Why this collection?
This post assembles 100 real-world, scenario-based questions frequently asked in Salesforce developer interviews (TCS, Infosys, Accenture, Wipro, Deloitte, EY, Amex and similar). Each scenario includes a practical answer, code or Flow patterns, and best-practice tips so you can demonstrate problem-solving — not rote memorization — in interviews.
How to use this guide
Focus on understanding the principles behind each scenario: when to use Flows vs Apex, how to design scalable async jobs, SOQL/SOSL optimization, and anti-patterns such as SOQL-in-loop or mixing setup/non-setup DML. Practice the examples and be prepared to explain trade-offs.
Key areas covered
- Admin & basics: security, record access, validation rules, Record Types
- Apex & triggers: bulk-safe triggers, mix-DML, addError(), static flags
- SOQL & Database: semi/anti-joins, aggregate queries, selective filters
- LWC & UI: refreshApex, keyset pagination, static resources, LMS
- Flows & automation: before-save vs after-save, Subflows, Scheduled Flows
- Async & integrations: Batch, Queueable, Continuation, Platform Events, CDC
Representative scenarios & patterns
Below are a few concise examples taken from the full list to illustrate the approach and common patterns.
Prevent concurrent updates (row locking)
List<Account> accs = [ SELECT Id, Name FROM Account WHERE Id IN :accIds FOR UPDATE ]; // modify and update for (Account a : accs) a.Rating = 'Hot'; update accs;
Best practice: Use FOR UPDATE sparingly, catch UNABLE_TO_LOCK_ROW and retry asynchronously if needed.
Find duplicate Contacts by Email (aggregate)
SELECT Email, COUNT(Id) FROM Contact WHERE Email != NULL GROUP BY Email HAVING COUNT(Id) > 1
Follow up by building a merge strategy or Duplicate Rule to prevent future duplicates.
Bulk processing >50k rows
Use Batch Apex with Database.getQueryLocator and a small scope (e.g., 100–200). Keep operations idempotent and, where necessary, use Database.Stateful for cross-batch aggregates.
Interview prep checklist
- Understand why a solution is chosen (flow vs apex, sync vs async).
- Be able to explain governor limits and how your approach avoids them.
- Practice whiteboard-style explanations for 10–15 scenarios.
- Know a few reusable code/flow snippets (bulk-safe trigger, batch skeleton, keyset pagination).
- Prepare for follow-ups: trade-offs, scaling, security (FLS/CRUD), and error handling.
Where this helps
This guide is useful for freshers and experienced professionals preparing for developer interviews, system design discussions, and real-world problem solving on the Salesforce platform. It’s also a handy revision resource before interviews at consulting firms and product companies.
Final notes
Study for problem solving. Interviewers want to see how you think through constraints, choose patterns that scale, and communicate trade-offs. Use this collection as a revision checklist, not as a script.
Why this matters: For Salesforce admins, developers, and business stakeholders, applying these patterns reduces risk, improves performance, and delivers predictable, maintainable solutions that align with platform best practices.








Leave a Reply