89 Infosys Salesforce Interview Questions & Answers (2026) | SF Interview Pro

📅  Company-Wise
89 Infosys Salesforce Interview Questions & Answers (2026) | SF Interview Pro
🏢 Company-Wise · Infosys

89 Infosys Salesforce Interview Questions & Answers (2026)

Real Infosys Salesforce Developer interview rounds plus broader cross-company prep and original delivery scenarios

89Questions
6Rounds Covered
100%Free
⚡ Complete Index — All 89 Questions
1When an Account is updated with the Billing City field, the same... 2Explain the Order of Execution in Salesforce when a record is saved.... 3What is the difference between Future methods and Scheduled Apex?... 4Explain the LWC lifecycle hooks.... 5A batch job is set with a batch size of 2000 but is processing... 6What are the best practices you'd follow when writing Apex triggers?... 7If you call a future method from a trigger, does it get its own... 8What deployment process does your team currently follow?... 9How many future method calls are allowed in a single Apex transaction?... 10What's the difference between a Before trigger and an After trigger?... 11What is the difference between Process Builder and Workflow Rules?... 12What is Database.Stateful used for in Batch Apex?... 13What is the difference between Static and Dynamic Dashboards?... 14What are the different types of Reports and Dashboard components... 15What do you understand by Governor Limits, and can you name a few?... 16Write the syntax for Batch Apex, and explain the purpose of each... 17Write a Trigger to automatically create an associated Contact... 18What are the different events available in Apex Triggers?... 19What is the order of execution for events in Aura components, at a... 20What is Email-to-Case, and how does it work at a high level?... 21What are the different types of Flow in Salesforce?... 22Explain a scenario where you've used Aura components, even though... 23What is the difference between == and === in JavaScript, and does... 24In the Order of Execution, what runs first — a before-save Flow or... 25Write a trigger so that when a new Account is created, the... 26What are the Vlocity/OmniStudio basics you should know, even briefly?... 27Explain a real-time data integration scenario between Salesforce... 28When is the @wire adapter called in the LWC lifecycle, relative to... 29Have you worked on migrating Aura components to LWC? What approach... 30Have you done any Visualforce page migrations to Lightning? What... 31Have you worked on any governor limit exceptions? Give an example... 32How did you resolve a Record Lock (UNABLE_TO_LOCK_ROW) exception?... 33How do you prevent a trigger from getting stuck in a recursion loop?... 34What kind of parameters can a Future method accept, and what are... 35Can you call another Batch job from a Future method?... 36What do Test.startTest() and Test.stopTest() actually do?... 37How do you test a REST-exposed Apex class in a test method?... 38You need to pop up a modal in LWC — for example, an edit form... 39How many types of Flow are there in Salesforce as of the current... 40How would you debug and resolve a CPU Time Limit exception in Apex?... 41Write a Trigger to calculate the total sum of Opportunity Amounts... 42What is the Scope parameter in Batch Apex, and how do you use it... 43Flow versus Trigger — how do you decide which to use for a given... 44Write an LWC component to display Account records and their... 45Can we delete a User record in Production Salesforce?... 46How do you bypass a Validation Rule for a specific scenario... 47Write a trigger that creates a roll-up on a parent object from a... 48Explain Parent-to-Child and Child-to-Parent communication in LWC.... 49What is Limit.getQueries() versus Limit.getLimitQueries() used for?... 50What are the different data migration tools you've used, and can... 51What happens during an Upsert operation using an External ID field?... 52Explain the difference between Custom Settings and Custom Metadata... 53How would you handle errors inside a Batch Apex job, and how does... 54Write a Trigger: whenever an Opportunity is updated to a stage... 55What is the standard convention for Parent-to-Child and... 56What are the best practices to resolve or avoid a SOQL 101 ("too... 57A Lead has multiple Products associated with it. On Lead... 58Write a trigger so that when an Opportunity's Stage changes, a... 59How would you design a Bulk API integration for an external... 60You need an LWC that fetches 2,000 records from an external... 61OWD is Private but a user's Profile has both View All and Modify... 62Write a trigger to display an error message preventing the... 63Write a SOQL query to restore records from the Recycle Bin... 64Two users have the same Profile, Role, and Permission Sets, with... 65How do you decide whether to write Apex sharing logic versus using... 66What is the difference between a Master-Detail relationship and a... 67What is the difference between SOQL and SOSL?... 68Walk through your understanding of Sharing in Salesforce,... 69What's your experience with Experience Cloud (Communities)?... 70What types of Salesforce integrations have you worked on?... 71What are the different types of Salesforce objects, and how do you... 72Explain a Salesforce implementation you've been part of, end-to-end.... 73What is the difference between Role and Profile in Salesforce?... 74What is a Wire Adapter in LWC, and how does it differ from a plain... 75What's the difference between the Salesforce REST API and Bulk... 76What's your understanding of the Salesforce multi-tenant... 77Infosys has assigned you to a client project where the previous... 78A client's Salesforce org integrates with 3 different downstream... 79You're brought onto an existing Infosys-managed account where the... 80A client's Account object has grown to 180 fields over several... 81Your team inherits a client org where a critical nightly Batch job... 82A client wants a single Opportunity Stage picklist shared across... 83During a code review, you notice a colleague's trigger performs a... 84A client's Community (Experience Cloud) site was recently found to... 85You're asked to estimate a project migrating a client from Classic... 86A long-running Batch job processing a very large custom object... 87A client asks whether they should build a custom LWC-based... 88You're pairing with a junior developer at Infosys who wrote a... 89A client's Sales Cloud org has three regional teams (US, EMEA,...
⚙️

Apex, Triggers & Core Fundamentals

Q1–Q22 · The standard first-round screening: order of execution, triggers, and basic Apex mechanics

Q001Apex & Triggers

When an Account is updated with the Billing City field, the same Billing City should update on related Contacts. Write the trigger.

On Account after update, detect where BillingCity actually changed by comparing Trigger.new to Trigger.oldMap, then bulk-update the related Contacts' MailingCity to match.
🔑 Key Points
Always guard on an actual change, not just any Account update — otherwise every unrelated Account edit triggers a wasted Contact query and DML, which adds up fast in a high-volume org.
🌍 Example
A logistics company keeps Contact mailing addresses in sync with their parent Account's city automatically, so a single Account correction propagates without needing a separate manual fix on each Contact.
trigger AccountCitySync on Account (after update) { Set<Id> changedIds = new Set<Id>(); for (Account acc : Trigger.new) { if (acc.BillingCity != Trigger.oldMap.get(acc.Id).BillingCity) changedIds.add(acc.Id); } if (changedIds.isEmpty()) return; List<Contact> toUpdate = [SELECT Id, AccountId, MailingCity FROM Contact WHERE AccountId IN :changedIds]; Map<Id, Account> accMap = new Map<Id, Account>([SELECT Id, BillingCity FROM Account WHERE Id IN :changedIds]); for (Contact c : toUpdate) c.MailingCity = accMap.get(c.AccountId).BillingCity; update toUpdate; }
Q002Apex & Triggers

Explain the Order of Execution in Salesforce when a record is saved.

Roughly: system validation → before-save Flows and before triggers → duplicate rules → other validation rules → after-save Flows and after triggers → assignment/auto-response rules → workflow rules (legacy) → escalation rules → roll-up summary recalculation → post-commit logic (async Apex, outbound messages, Platform Event publish).
🔑 Key Points
The single most commonly missed detail: before-save (fast field update) Flow logic runs before validation rules, meaning a Flow can set a field value that a Validation Rule then checks against — order matters directly for what a rule sees.
🌍 Example
A before-save Flow defaults a blank Region field based on the Account's Country before a Validation Rule requiring Region to be non-blank ever evaluates — reversing that order would break the validation.
Q003Apex & Triggers

What is the difference between Future methods and Scheduled Apex?

A future method runs asynchronously almost immediately after being enqueued, with no fixed schedule and no chaining ability; Scheduled Apex runs on a cron-based recurring schedule you define, typically to kick off a Batch job at a set time.
🔑 Key Points
Future methods are for "do this slightly later, off the critical path" (like a callout inside a trigger); Scheduled Apex is for "do this every night at 2 AM" — they solve fundamentally different timing problems, not just different syntax for the same thing.
Q004Apex & Triggers

Explain the LWC lifecycle hooks.

constructor() → connectedCallback() → render() → renderedCallback(), with disconnectedCallback() firing on removal from the DOM. For the full breakdown including when to use each one, see our LWC Interview Questions guide.
Q005Apex & Triggers

A batch job is set with a batch size of 2000 but is processing 10,001 records in chunks of 2000 — what happens across the batches, and what happens with the 6th (final partial) batch?

The job runs 6 execute() calls total — five full chunks of 2000 records each (10,000 total) and a sixth chunk containing just the remaining 1 record.
🔑 Key Points
Each execute() call gets its own fresh governor-limit budget regardless of whether the chunk is full or partial — a batch of 1 record in that final chunk still runs through the complete execute() logic exactly like any other chunk.
Q006Apex & Triggers

What are the best practices you'd follow when writing Apex triggers?

One trigger per object routed through a handler class, bulkify everything (no SOQL/DML inside loops), enforce CRUD/FLS/sharing, avoid hardcoded Ids, and keep business logic out of the trigger body itself.
🔑 Key Points
Add a recursion guard as a non-negotiable sixth item — even simple triggers can unexpectedly recurse once a second automation (a Flow, another trigger) touches the same object, so building the guard in from day one avoids a painful retrofit later.
Q007Apex & Triggers

If you call a future method from a trigger, does it get its own fresh set of governor limits?

Yes — a future method always executes in a completely separate transaction from the one that enqueued it, so it gets its own full governor-limit budget rather than sharing whatever limits the triggering transaction had already consumed.
🔑 Key Points
This is exactly why long callouts or heavy processing get pushed into a future method from a trigger — the synchronous trigger transaction stays fast and within its tighter limits, while the heavier work runs later with room to breathe.
Q008Apex & Triggers

What deployment process does your team currently follow?

Answer with your actual pipeline: source-driven development in Salesforce DX, feature branches merged via pull request after code review, and an automated CI/CD tool (Copado, Gearset, or GitHub Actions) deploying through a defined environment promotion path (Dev → QA → UAT → Prod).
🔑 Key Points
Naming the specific tool and environment promotion path — not just "we use CI/CD" — is what separates a concrete answer from a vague one; interviewers are listening for hands-on familiarity, not textbook process description.
Q009Apex & Triggers

How many future method calls are allowed in a single Apex transaction?

Up to 50 future method calls are allowed per Apex transaction, matching the general asynchronous Apex method limit for a single execution context.
🔑 Key Points
This limit is a strong signal to switch to Batch or Queueable Apex once you're looping and calling future() for each record individually — that pattern hits the 50-call ceiling fast at any real data volume.
Q010Apex & Triggers

What's the difference between a Before trigger and an After trigger?

A before trigger runs prior to the record being saved to the database and is used to modify the record's own field values directly (no extra DML needed); an after trigger runs once the record is already committed and is used for anything touching related/child records or that needs the record's final, saved Id.
🔑 Key Points
Modifying the triggering record's own fields in an after trigger requires a separate, wasteful additional DML statement — that unnecessary extra database round-trip is exactly the mistake this question is testing whether you know to avoid.
Q011Apex & Triggers

What is the difference between Process Builder and Workflow Rules?

Workflow Rules can only do simple field updates, send emails, create tasks, or fire outbound messages on a single object; Process Builder could do all of that plus create records, update related records across objects, and call Apex/Flow — though both are now legacy, fully superseded by Flow.
🔑 Key Points
In a current interview, the strongest answer explicitly notes both are deprecated in favor of Flow, and any new automation work should default to Flow rather than either legacy tool — showing awareness of where the platform is headed matters as much as knowing the historical distinction.
Q012Apex & Triggers

What is Database.Stateful used for in Batch Apex?

It preserves instance variable values across separate execute() invocations within the same batch job — without it, every chunk starts with completely fresh instance state, discarding whatever the previous chunk had accumulated.
🔑 Key Points
Only apply it when you genuinely need running totals or accumulated state across chunks (like a running counter) — it carries a small serialization overhead per chunk that's wasted if your batch doesn't actually need cross-chunk state.
Q013Apex & Triggers

What is the difference between Static and Dynamic Dashboards?

A Static Dashboard always shows data as seen by one fixed "Running User," regardless of who's viewing it; a Dynamic Dashboard shows each viewer their own data, filtered to what that specific logged-in user has access to see.
🔑 Key Points
Dynamic Dashboards are essential whenever different roles (a rep vs. their manager) should see the same dashboard layout but with data scoped to their own visibility — a Static Dashboard would either over-expose or under-represent data depending on which user's context it's fixed to.
Q014Apex & Triggers

What are the different types of Reports and Dashboard components you've worked with?

Report types: Tabular, Summary, Matrix, and Joined; common dashboard components: bar/line/pie charts, gauges, metrics, and tables — each suited to a different way of visualizing grouped or comparative data.
🔑 Key Points
Joined Reports specifically are worth calling out as underused — they let you combine multiple report types with different row groupings side-by-side, which is the right tool whenever a stakeholder wants two seemingly unrelated metrics compared on one page.
Q015Apex & Triggers

What do you understand by Governor Limits, and can you name a few?

Governor limits are hard resource caps Salesforce enforces per transaction to protect the shared multi-tenant infrastructure — examples include 100 SOQL queries, 150 DML statements, and 10,000 DML rows per transaction (synchronous context).
🔑 Key Points
The limits reset per transaction, which is exactly why async Apex (future/Queueable/Batch) is the standard escape valve for work that would otherwise exceed them in a single synchronous run — each async invocation gets its own fresh budget.
Q016Apex & Triggers

Write the syntax for Batch Apex, and explain the purpose of each interface method.

Batch Apex implements Database.Batchable with three required methods: start() defines the scope of records to process, execute() runs the actual logic per chunk, and finish() runs once after all chunks complete, typically for summary notifications.
global class MyBatch implements Database.Batchable<sObject> { global Database.QueryLocator start(Database.BatchableContext bc) { return Database.getQueryLocator([SELECT Id FROM Account]); } global void execute(Database.BatchableContext bc, List<sObject> scope) { // process this chunk } global void finish(Database.BatchableContext bc) { // send summary email, chain another job, etc. } }
Q017Apex & Triggers

Write a Trigger to automatically create an associated Contact whenever a new Account is created.

On Account after insert, build one Contact per new Account and insert them in bulk.
🔑 Key Points
Decide upfront what LastName the auto-created Contact should get when the Account provides no obvious individual name — a common gap that trips up an otherwise correct bulk-safe trigger.
trigger CreateDefaultContact on Account (after insert) { List<Contact> newContacts = new List<Contact>(); for (Account acc : Trigger.new) { newContacts.add(new Contact(LastName = acc.Name, AccountId = acc.Id)); } insert newContacts; }
Q018Apex & Triggers

What are the different events available in Apex Triggers?

before insert, before update, before delete, after insert, after update, after delete, and after undelete — seven distinct trigger events, notably with no "before undelete" since a record already exists by the time undelete happens.
🔑 Key Points
Knowing there's no before undelete event is a small but genuinely useful detail — any validation you'd want to run before restoring a deleted record has to live in the after undelete context instead, changing how you'd structure that specific piece of logic.
Q019Apex & Triggers

What is the order of execution for events in Aura components, at a high level?

Roughly: component initialization (init handler) → attribute value changes → rendering (render/afterRender) → client-side controller actions in response to user interaction, all coordinated through the framework's own internal event queue.
🔑 Key Points
This is largely superseded knowledge now that LWC is the current standard — worth mentioning briefly for legacy Aura maintenance context, but not worth over-investing prep time in unless the role specifically involves an existing Aura codebase.
Q020Apex & Triggers

What is Email-to-Case, and how does it work at a high level?

Email-to-Case automatically creates a Case record from an inbound email sent to a designated support address, populating Case fields from the email content and attaching the message thread as related EmailMessage records.
🔑 Key Points
On-Demand Email-to-Case (cloud-based, no local agent needed) is the modern default over the older Email-to-Case Agent that required an on-premise mail server component — worth specifying which variant you mean if asked to go deeper.
Q021Apex & Triggers

What are the different types of Flow in Salesforce?

Screen Flow (user-facing, multi-step forms), Record-Triggered Flow (fires on record create/update/delete), Schedule-Triggered Flow (runs on a recurring schedule), Autolaunched Flow (invoked from Apex/another Flow with no UI), and Platform Event-Triggered Flow.
🔑 Key Points
Record-Triggered Flows further split into before-save (fast field updates, no separate DML) and after-save (for anything touching related records) — knowing this sub-distinction is usually what separates a surface-level answer from a genuinely hands-on one.
Q022Apex & Triggers

Explain a scenario where you've used Aura components, even though LWC is now the default choice.

A legitimate answer: maintaining an existing Aura-based Community/App that predates LWC's introduction, or needing a feature only Aura supports natively (like certain drag-and-drop admin tooling in App Builder itself).
🔑 Key Points
It's fine — even expected at many Infosys client engagements — to say most new component work today is LWC, with Aura touched only for legacy maintenance; that's an accurate and current answer, not a weak one.
🧩

LWC, Async Apex & Deployment

Q23–Q40 · LWC lifecycle, wire adapters, Queueable/Batch Apex, and deployment tooling

Q023LWC & Async Apex

What is the difference between == and === in JavaScript, and does this matter in LWC?

== performs type coercion before comparing (so '5' == 5 is true); === compares both value and type strictly without coercion (so '5' === 5 is false) — always prefer === in LWC JavaScript to avoid subtle coercion bugs.
🔑 Key Points
This shows up constantly in real LWC code when comparing a value pulled from an HTML input event (always a string) against a stored number — using == accidentally masks a type mismatch that === would correctly flag.
Q024LWC & Async Apex

In the Order of Execution, what runs first — a before-save Flow or a before trigger?

Before-save (fast field update) Flow logic runs first, immediately followed by before triggers, both prior to validation rules — Salesforce processes all before-context automation (Flow and Apex trigger) before moving to validation.
🔑 Key Points
This exact ordering is why a before-save Flow can set a default value that a subsequent Validation Rule then correctly checks — reversing the assumption here is a common source of "why did my validation rule fail even though the Flow should have fixed it" confusion.
Q025LWC & Async Apex

Write a trigger so that when a new Account is created, the Shipping City automatically populates from the Billing City.

On Account before insert, directly set ShippingCity = BillingCity on each new record — no extra DML needed since it's modifying the record's own field before it's saved.
trigger DefaultShippingCity on Account (before insert) { for (Account acc : Trigger.new) { if (String.isBlank(acc.ShippingCity)) acc.ShippingCity = acc.BillingCity; } }
Q026LWC & Async Apex

What are the Vlocity/OmniStudio basics you should know, even briefly?

OmniStudio (formerly Vlocity) provides declarative tools for building guided processes: OmniScripts (multi-step guided flows), DataRaptors (data extraction/transformation without Apex), FlexCards (reusable UI cards), and Integration Procedures (server-side orchestration).
🔑 Key Points
It's an industry-cloud-adjacent skillset most common in Communications, Health, and Financial Services Cloud implementations — worth knowing the four core building blocks by name even if your hands-on depth is limited, since interviewers often just check baseline vocabulary here.
Q027LWC & Async Apex

Explain a real-time data integration scenario between Salesforce and SAP.

A typical pattern: Salesforce exposes or consumes REST/SOAP endpoints authenticated via a Connected App and Named Credential, with middleware (often SAP PI/PO or MuleSoft) handling the actual data transformation and routing between the two systems' differing data models.
🔑 Key Points
The "real-time" framing matters — batch-based nightly syncs and true real-time (synchronous callout or near-instant Platform Event-driven) integration are architecturally very different, so clarify which one the question is actually asking about before diving into implementation details.
Q028LWC & Async Apex

When is the @wire adapter called in the LWC lifecycle, relative to connectedCallback?

@wire fires after connectedCallback() but before the initial render — it's reactive from the start of the component's life, not something you manually trigger from within connectedCallback. See the LWC Interview Questions guide for the complete lifecycle-and-wire interaction breakdown.
Q029LWC & Async Apex

Have you worked on migrating Aura components to LWC? What approach did you follow?

A structured migration typically inventories existing Aura components by usage/complexity, prioritizes high-traffic or high-maintenance ones first, and rebuilds them in LWC leveraging its simpler syntax and better performance, testing thoroughly against the original Aura behavior before cutover.
🔑 Key Points
The biggest real-world gotcha in these migrations is Aura's more permissive two-way data binding versus LWC's stricter reactivity model — logic that silently relied on Aura's implicit binding behavior often needs explicit reactivity fixes, not just a syntax port.
Q030LWC & Async Apex

Have you done any Visualforce page migrations to Lightning? What was your approach?

Assess each VF page against whether a native Lightning/LWC equivalent already exists (many standard VF use cases are now covered natively), migrate custom logic-heavy pages to LWC with an Apex controller replacing the VF controller, and use Lightning Out or embedding only as a last resort for pages too complex to justify a full rebuild.
🔑 Key Points
Not every VF page needs migrating immediately — pages working fine and rarely touched are often lower priority than the LWC migration work itself, and flagging that prioritization judgment in an answer shows practical project sense.
Q031LWC & Async Apex

Have you worked on any governor limit exceptions? Give an example of how you fixed one.

Answer with a specific exception (Too Many SOQL Queries, CPU Time Limit Exceeded, Too Many DML Statements) and the concrete fix — almost always bulkifying a loop that was issuing SOQL/DML per record instead of batched.
🔑 Key Points
Naming the exact exception message and the specific code pattern that caused it (not just "I fixed a governor limit issue") is what makes this answer credible rather than generic.
Q032LWC & Async Apex

How did you resolve a Record Lock (UNABLE_TO_LOCK_ROW) exception?

Identified the concurrent process contending for the same record (often two automations updating the same parent record simultaneously), and either serialized the conflicting operations, reduced batch/chunk size to shorten the lock window, or used FOR UPDATE deliberately with a narrower scope.
🔑 Key Points
Row lock errors are almost always a timing/concurrency problem, not a logic bug — the fix is about *when* two processes touch the same record, not about what either process's code actually does.
Q033LWC & Async Apex

How do you prevent a trigger from getting stuck in a recursion loop?

Use a static Set of already-processed record Ids checked at the top of the handler (more precise than a blunt static Boolean), so legitimate updates to different records in the same transaction still process correctly.
🔑 Key Points
This exact answer pattern (Set over static Boolean) is one of the most consistently asked trigger questions across every company in this dataset — worth having the code memorized cold, not just the concept.
Q034LWC & Async Apex

What kind of parameters can a Future method accept, and what are the limitations?

Only primitive types (String, Integer, Boolean, etc.) and collections of primitives — no sObjects, no custom Apex objects, and no other future/complex parameter types.
🔑 Key Points
The workaround for needing to process actual records is always the same: pass a List instead of the records themselves, then re-query fresh data for those Ids inside the future method — guaranteeing current data rather than a potentially stale snapshot.
Q035LWC & Async Apex

Can you call another Batch job from a Future method?

No — a future method cannot invoke Batch Apex; attempting to call Database.executeBatch() from within a future method throws a runtime exception.
🔑 Key Points
If you need future-method-triggered batch processing, the correct pattern is Queueable Apex instead, since Queueable jobs (unlike future methods) are allowed to call Database.executeBatch().
Q036LWC & Async Apex

What do Test.startTest() and Test.stopTest() actually do?

They delineate a fresh governor-limit context and force any asynchronous work enqueued inside that block (future, Queueable, Batch, Scheduled) to execute synchronously the moment stopTest() completes — enabling immediate assertions on async side effects.
🔑 Key Points
You can only call each of startTest()/stopTest() once per test method — attempting to nest or repeat them throws a runtime error, a detail worth knowing if the interviewer follows up with an edge-case question.
Q037LWC & Async Apex

How do you test a REST-exposed Apex class in a test method?

Construct a RestContext.request and RestContext.response manually with the desired request body/headers, invoke the @RestResource method directly, and assert on both the returned response and any resulting database state.
RestRequest req = new RestRequest(); req.requestURI = '/services/apexrest/myEndpoint/'; req.httpMethod = 'POST'; req.requestBody = Blob.valueOf('{"key":"value"}'); RestContext.request = req; RestContext.response = new RestResponse(); MyRestClass.handlePost();
Q038LWC & Async Apex

You need to pop up a modal in LWC — for example, an edit form triggered from a button. How do you implement it?

Toggle a reactive Boolean property (e.g. showModal) on button click, conditionally render the modal markup using lwc:if bound to that property, and typically embed lightning-record-edit-form inside the modal for the actual editable fields.
🔑 Key Points
See the LWC Interview Questions guide for the full conditional-rendering syntax and modal-pattern code example.
Q039LWC & Async Apex

How many types of Flow are there in Salesforce as of the current release, and did you work on Schedule-Triggered Flow specifically?

Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow, Autolaunched Flow, and Platform Event-Triggered Flow — Schedule-Triggered specifically runs on a defined recurring cadence (daily/weekly) independent of any record change, closer in purpose to Scheduled Apex than to a Record-Triggered Flow.
🔑 Key Points
Schedule-Triggered Flow is the right tool whenever a requirement says "every night, check for records matching X and do Y" — a genuinely recurring, time-based trigger rather than a reaction to a specific record event.
Q040LWC & Async Apex

How would you debug and resolve a CPU Time Limit exception in Apex?

Pull the debug log for the exact transaction, look for nested loops, excessive string concatenation inside a loop, or unbounded recursive calls — the CPU clock only counts actual computation time, not database wait time, so the fix is almost always algorithmic, not query-related.
🔑 Key Points
A very common trap: assuming a slow SOQL query caused the CPU timeout — database round-trip time is explicitly excluded from the CPU clock, so the real culprit is virtually always in-memory logic complexity, not query performance.
🔁

Migration, Testing & Debugging

Q41–Q56 · Classic-to-Lightning migration, governor limit debugging, and test class patterns

Q041Migration & Testing

Write a Trigger to calculate the total sum of Opportunity Amounts and store it on a custom Account field, using a Trigger Context Variable correctly.

On Opportunity after insert/update/delete/undelete, gather affected AccountIds from the appropriate context variable (Trigger.new for insert/update, Trigger.old for delete), aggregate SUM(Amount) grouped by AccountId, and bulk-update the parent Accounts.
🔑 Key Points
Trigger.old must be used for the delete context specifically — Trigger.new is null during a pure delete operation, a detail that trips up even experienced developers writing their first combined insert/update/delete trigger.
trigger OppAmountRollup on Opportunity (after insert, after update, after delete, after undelete) { Set<Id> accIds = new Set<Id>(); for (Opportunity o : (Trigger.isDelete ? Trigger.old : Trigger.new)) accIds.add(o.AccountId); Map<Id, Decimal> totals = new Map<Id, Decimal>(); for (AggregateResult ar : [SELECT AccountId, SUM(Amount) total FROM Opportunity WHERE AccountId IN :accIds GROUP BY AccountId]) { totals.put((Id) ar.get('AccountId'), (Decimal) ar.get('total')); } List<Account> toUpdate = new List<Account>(); for (Id accId : accIds) toUpdate.add(new Account(Id = accId, Total_Opp_Amount__c = totals.containsKey(accId) ? totals.get(accId) : 0)); update toUpdate; }
Q042Migration & Testing

What is the Scope parameter in Batch Apex, and how do you use it correctly?

The scope parameter (second argument to Database.executeBatch()) sets the chunk size — how many records get passed into each execute() call, defaulting to 200 if not specified, with 2000 as the maximum.
🔑 Key Points
Smaller scope sizes reduce the risk of hitting per-chunk governor limits on heavy per-record processing (like external callouts), at the cost of more total execute() invocations and longer overall job runtime — it's a genuine tradeoff, not a "bigger is always better" setting.
Q043Migration & Testing

Flow versus Trigger — how do you decide which to use for a given requirement?

Default to Flow for straightforward field updates, simple conditional logic, and anything an admin needs to maintain after handoff; reach for a Trigger when the logic is complex, needs fine bulkification control, or requires functionality (like certain callout patterns) Flow can't cleanly express.
🔑 Key Points
Maintainability by whoever inherits the org matters as much as raw technical capability in this decision — a technically "cleaner" Apex solution that only a developer can touch later is sometimes the wrong choice if the client team is admin-only.
Q044Migration & Testing

Write an LWC component to display Account records and their related Contacts in a datatable.

Wire an Apex method returning Accounts with a nested Contacts sub-query, flatten or structure the result for lightning-datatable columns, and bind the wired result to the datatable's data attribute. For the complete component code pattern and datatable configuration, see the LWC Interview Questions guide.
@AuraEnabled(cacheable=true) public static List<Account> getAccountsWithContacts() { return [SELECT Id, Name, (SELECT Id, Name, Email FROM Contacts) FROM Account LIMIT 50]; }
Q045Migration & Testing

Can we delete a User record in Production Salesforce?

No — User records can never be hard-deleted in Salesforce; they can only be deactivated (Active checkbox unchecked), which frees the license for reassignment while preserving all historical record ownership and audit trail integrity.
🔑 Key Points
This is a platform-level design decision, not a permission restriction — even a System Administrator with every permission enabled has no path to actually delete a User record, since doing so would orphan every record that user ever owned or touched.
Q046Migration & Testing

How do you bypass a Validation Rule for a specific scenario without disabling it for everyone?

Wrap the rule's condition with a check against a Custom Permission (e.g. NOT($Permission.Bypass_Validation)), and assign that Custom Permission only to the specific user or integration account that needs the bypass via a Permission Set.
🔑 Key Points
This is far safer than a Profile-based check, since Custom Permissions are individually assignable without needing to touch or clone an entire Profile just to grant one narrow bypass.
Q047Migration & Testing

Write a trigger that creates a roll-up on a parent object from a child object — for example, summing a custom Amount field from a child object onto its parent.

On the child object's after insert/update/delete/undelete, aggregate SUM() grouped by the parent lookup field, and bulk-update the parent records with the resulting totals.
🔑 Key Points
This is the standard workaround whenever the parent-child relationship is a lookup rather than master-detail, since native roll-up summary fields only work across master-detail relationships — Apex is the only option for lookup-based rollups.
Q048Migration & Testing

Explain Parent-to-Child and Child-to-Parent communication in LWC.

Parent to child: pass data via an @api-decorated public property on the child, referenced as an attribute in the parent's template. Child to parent: the child dispatches a CustomEvent that the parent listens for via an event handler attribute. Full syntax and code examples are in our LWC Interview Questions guide.
Q049Migration & Testing

What is Limit.getQueries() versus Limit.getLimitQueries() used for?

Limit.getQueries() returns the number of SOQL queries already used in the current transaction; Limit.getLimitQueries() returns the maximum allowed for that context — comparing the two lets you defensively check remaining query budget before issuing another query.
🔑 Key Points
This pattern is genuinely useful inside generic, reusable utility methods that might get called from many different contexts with unpredictable existing limit consumption — checking remaining budget before querying avoids a hard governor-limit crash deep inside shared code.
Q050Migration & Testing

What are the different data migration tools you've used, and can you insert Custom Settings via the Data Import Wizard?

Data Loader (bulk, CLI/desktop, supports all objects including Custom Settings), Data Import Wizard (simpler UI, standard/common custom objects only — notably it does NOT support inserting Custom Settings), and Workbench for smaller ad hoc loads.
🔑 Key Points
This is a specific, frequently-tested gotcha: the Data Import Wizard's object list is more limited than Data Loader's — Custom Settings specifically require Data Loader or the Metadata API, not the Wizard.
Q051Migration & Testing

What happens during an Upsert operation using an External ID field?

Salesforce matches incoming records against existing ones by the specified External ID field value — a match updates the existing record, no match inserts a new one, and multiple matches on a non-unique External ID field throws an error.
🔑 Key Points
The External ID field must be marked "External ID" (and ideally also "Unique") in its field definition for upsert to work reliably — without the Unique constraint, an ambiguous multi-match scenario becomes a real risk during large data loads.
Q052Migration & Testing

Explain the difference between Custom Settings and Custom Metadata Types.

Custom Settings store configuration data accessible without a SOQL query (counted separately from governor limits) but don't deploy with metadata packages; Custom Metadata Types ARE deployable metadata (move with packages/change sets automatically) and are queryable like records but don't get the special governor-limit-free access Custom Settings do.
🔑 Key Points
For anything environment-specific that needs to travel with a deployment (API endpoints, feature toggles), Custom Metadata is now the generally preferred choice — Custom Settings remain useful mainly for legacy compatibility or genuinely org-specific runtime data that shouldn't move between environments.
Q053Migration & Testing

How would you handle errors inside a Batch Apex job, and how does Database.Stateful relate to error handling?

Log failures per-record inside execute() using Database.insert/update(records, false) to get partial success with a SaveResult array, persisting failure details to a custom Error_Log__c object; Database.Stateful lets you additionally track a running error count across all chunks for a summary in finish().
🔑 Key Points
Combining per-record error logging with a Stateful running counter gives you both the detail needed to reprocess specific failures AND a single summary number for the finish() notification email — most production batch jobs need both, not just one or the other.
Q054Migration & Testing

Write a Trigger: whenever an Opportunity is updated to a stage older than 30 days and StageName is not Closed Won, update the Account details.

On Opportunity after update, filter for Opportunities where the last stage change is older than 30 days and StageName != 'Closed Won', then apply the required Account-level update in bulk for the affected parent Accounts.
🔑 Key Points
"Older than 30 days" needs a clear definition before coding — is it 30 days since CreatedDate, since LastModifiedDate, or since a custom Stage_Changed_Date__c field? Clarify this with the interviewer rather than assuming, since each interpretation produces meaningfully different logic.
Q055Migration & Testing

What is the standard convention for Parent-to-Child and Child-to-Parent communication when there's no direct relationship at all?

Lightning Message Service (LMS) via a declared Message Channel — it works across LWC, Aura, and Visualforce regardless of DOM hierarchy, unlike the parent-child @api/CustomEvent pattern which requires an actual containment relationship. Full syntax in the LWC Interview Questions guide.
Q056Migration & Testing

What are the best practices to resolve or avoid a SOQL 101 ("too many SOQL queries") error?

Move every SOQL query outside of loops, use Maps built from a single bulk query instead of querying inside a for-loop, and consolidate related queries into fewer, broader ones using relationship queries (parent-child sub-queries) instead of separate round-trips.
🔑 Key Points
The fix pattern is almost always identical: replace "query inside the loop, once per record" with "query once outside the loop into a Map, then look up inside the loop" — recognizing this exact refactor is what the question is really testing.
💼

Advanced Trigger & Sharing Scenarios

Q57–Q65 · Cross-object relationships, security scenarios, and architecture-level questions

Q057Sharing & Advanced Apex

A Lead has multiple Products associated with it. On Lead conversion, the resulting Opportunity should map to the same Products. How do you achieve this — and could this be done with a Flow instead of Apex?

Override the standard Lead Conversion process (or hook into it via Apex on the resulting Opportunity) to copy the related Product records from Lead to the newly created Opportunity as OpportunityLineItems, using the same Pricebook Entry mapping. Yes — an Autolaunched Flow triggered from a Lead Convert Apex action or a Record-Triggered Flow on the resulting Opportunity can achieve the same mapping declaratively.
🔑 Key Points
Lead Convert is one of the trickier standard processes to hook custom logic into cleanly — favor a Record-Triggered Flow or after-insert trigger on the newly created Opportunity over trying to inject logic into the conversion process itself, which is more fragile to customize directly.
Q058Sharing & Advanced Apex

Write a trigger so that when an Opportunity's Stage changes, a Task is automatically created and assigned to the Opportunity owner.

On Opportunity after update, detect a StageName change by comparing against Trigger.oldMap, and bulk-insert a Task per changed Opportunity with WhatId set to the Opportunity and OwnerId/WhoId set appropriately.
trigger OppStageTask on Opportunity (after update) { List<Task> tasks = new List<Task>(); for (Opportunity o : Trigger.new) { if (o.StageName != Trigger.oldMap.get(o.Id).StageName) { tasks.add(new Task(Subject = 'Stage changed to ' + o.StageName, WhatId = o.Id, OwnerId = o.OwnerId, ActivityDate = Date.today().addDays(3))); } } if (!tasks.isEmpty()) insert tasks; }
Q059Sharing & Advanced Apex

How would you design a Bulk API integration for an external application sending Salesforce large volumes of data?

Use the Bulk API 2.0 for high-volume asynchronous data loads (better suited to 10,000+ record batches than the standard REST API), with the external system submitting a job, uploading CSV batches, and polling for completion status rather than a synchronous request-response pattern.
🔑 Key Points
Bulk API is specifically designed to trade real-time responsiveness for volume efficiency — if the external system genuinely needs synchronous confirmation per record, standard REST/Composite API is the correct choice instead, not Bulk API forced into an unsuitable real-time use case.
Q060Sharing & Advanced Apex

You need an LWC that fetches 2,000 records from an external application, displays them for user selection, but doesn't save anything until the user explicitly selects records and clicks save. How would you architect this?

Fetch the data into the component's JavaScript state (not into any Salesforce object yet) via an imperative Apex call to a controller that calls the external system, render it in a lightning-datatable with row selection enabled, and only perform the actual Salesforce DML on the selected subset when the user clicks Save.
🔑 Key Points
Keeping the fetched-but-unselected data purely in client-side JS state (never persisted) is the key design decision here — persisting all 2,000 records temporarily just to let the user pick a subset would be wasteful and create unnecessary cleanup logic for the unselected majority.
Q061Sharing & Advanced Apex

OWD is Private but a user's Profile has both View All and Modify All checked for that object — what access does that user actually have?

View All and Modify All are Profile-level system permissions that override OWD entirely for that object — the user sees and can edit every record of that type regardless of the Private OWD setting, sharing rules, or role hierarchy.
🔑 Key Points
This is one of the most commonly misunderstood permission interactions — View All/Modify All aren't "just another sharing mechanism," they're a blanket override that makes OWD, sharing rules, and role hierarchy irrelevant entirely for that specific object.
Q062Sharing & Advanced Apex

Write a trigger to display an error message preventing the creation of a duplicate Account.

On Account before insert, check the incoming Name against existing Account names in bulk, and call addError() on any record matching an existing one.
🔑 Key Points
A production-grade version of this should really defer to native Duplicate Rules and Matching Rules where possible — they're purpose-built for this exact requirement with fuzzy-matching support a simple exact-name-match trigger can't replicate.
trigger PreventDuplicateAccount on Account (before insert) { Set<String> existingNames = new Set<String>(); for (Account a : [SELECT Name FROM Account]) existingNames.add(a.Name.toLowerCase()); for (Account acc : Trigger.new) { if (existingNames.contains(acc.Name.toLowerCase())) { acc.Name.addError('An Account with this name already exists.'); } } }
Q063Sharing & Advanced Apex

Write a SOQL query to restore records from the Recycle Bin programmatically.

Use the ALL ROWS clause to query records including deleted ones still in the Recycle Bin, then perform an undelete DML statement on the resulting records.
List<Account> deletedAccs = [SELECT Id FROM Account WHERE IsDeleted = true ALL ROWS]; undelete deletedAccs;
Q064Sharing & Advanced Apex

Two users have the same Profile, Role, and Permission Sets, with OWD set to Private for an object — will they see each other's records?

Not by default — Private OWD with no sharing rule, no manual sharing, and no role hierarchy relationship between them means each user sees only records they personally own, even with identical Profile/Role/Permission Set configuration.
🔑 Key Points
Having the same Role specifically does NOT grant visibility into each other's records — role hierarchy only grants a manager visibility into a subordinate's records (upward flow), never lateral visibility between two peers sitting at the same role level.
Q065Sharing & Advanced Apex

How do you decide whether to write Apex sharing logic versus using a declarative sharing rule?

Reach for Apex-managed sharing only when the access logic depends on conditions a declarative Sharing Rule genuinely can't express (a calculated field, an external data lookup, a geo-radius condition) — for any criteria a standard Sharing Rule can evaluate directly, the declarative option is simpler and more maintainable long-term.
🔑 Key Points
The maintainability gap matters a lot here — a declarative Sharing Rule is editable by any admin without a deployment, while Apex-managed sharing logic requires a developer for even a small criteria tweak, so the added complexity needs a genuine functional justification.
🌐

Broader Interview Prep — Beyond Infosys

Q66–Q76 · Common Salesforce Developer questions that show up across most service-based companies

Q066Consulting & Delivery

What is the difference between a Master-Detail relationship and a Lookup relationship?

Master-Detail ties the child record's existence and security to its parent (deleting the parent cascades to delete children, and OWD/sharing follows the parent), and enables native roll-up summary fields; Lookup is a looser, optional relationship with independent security and no native rollup support.
🔑 Key Points
The single most consequential practical difference: a Lookup relationship can never have a native roll-up summary field — that's exactly why an Apex-based rollup trigger becomes necessary the moment a relationship is built as Lookup instead of Master-Detail.
Q067Consulting & Delivery

What is the difference between SOQL and SOSL?

SOQL queries a single object type (with optional related-object sub-queries) and supports full filtering, sorting, and aggregation; SOSL performs a text search across multiple object types simultaneously in one call, but with more limited filtering capability than SOQL.
🔑 Key Points
SOSL is the right tool specifically when you don't know in advance which object type contains a match (searching for an email across Leads AND Contacts at once) — for anything with a known target object and precise filter criteria, SOQL is almost always the better fit.
Q068Consulting & Delivery

Walk through your understanding of Sharing in Salesforce, including a scenario where you've used Apex-managed sharing.

Sharing determines record-level visibility once object/field permissions already allow access — layered through OWD, Role Hierarchy, Sharing Rules, Manual Sharing, and Apex-managed sharing for anything too complex for the declarative options.
🔑 Key Points
A strong answer names a genuinely complex scenario (not just a textbook definition) — like sharing based on a calculated geographic radius or a multi-condition business rule that no single declarative Sharing Rule criteria could express alone.
Q069Consulting & Delivery

What's your experience with Experience Cloud (Communities)?

Answer with a concrete build: Guest User configuration for public pages, Sharing Sets for authenticated external users tied to their own Account/Contact relationship, and any custom LWC components built specifically for the Community context.
🔑 Key Points
Guest User security specifically is worth calling out proactively — over-permissioning that profile is one of the most serious real-world data-exposure risks in Salesforce, and mentioning you're aware of that risk signals genuine hands-on Community experience.
Q070Consulting & Delivery

What types of Salesforce integrations have you worked on?

REST/SOAP API-based point-to-point integrations, middleware-based integrations (MuleSoft or similar) for higher-complexity multi-system scenarios, Platform Event-driven near-real-time integrations, and Bulk API for high-volume batch data exchange.
🔑 Key Points
Naming the authentication mechanism used (Named Credential with OAuth 2.0, specifically which grant type) alongside the integration pattern itself is what separates a strong integration answer from a purely conceptual one.
Q071Consulting & Delivery

What are the different types of Salesforce objects, and how do you decide between Custom Object and Custom Metadata Type for a given requirement?

Standard Objects (Account, Contact, Opportunity), Custom Objects (business data, unlimited records, standard security model), Custom Settings, and Custom Metadata Types (configuration, deployable, limited record counts by design) — Custom Object is for real transactional business data; Custom Metadata is specifically for configuration that should travel with deployments.
🔑 Key Points
A common mis-design is using a Custom Object for what's really configuration data (like a list of API endpoints per environment) — that data belongs in Custom Metadata specifically because it then deploys automatically with the package instead of needing manual re-entry per environment.
Q072Consulting & Delivery

Explain a Salesforce implementation you've been part of, end-to-end.

Structure the answer around: the business problem being solved, the clouds/objects involved, your specific role and contributions, a technical challenge you navigated, and the measurable outcome or adoption result.
🔑 Key Points
Interviewers are listening for structure and specificity here as much as the actual project details — a rambling, unstructured project walkthrough undersells even genuinely strong technical work.
Q073Consulting & Delivery

What is the difference between Role and Profile in Salesforce?

A Profile is mandatory for every user and controls object/field-level CRUD and system permissions; a Role is optional and controls record-level visibility through the role hierarchy — granting managers visibility into records owned by their subordinates.
🔑 Key Points
A user can function fully with no Role assigned at all — Roles only become necessary once hierarchy-based record visibility (a manager seeing a subordinate's records) is actually a requirement.
Q074Consulting & Delivery

What is a Wire Adapter in LWC, and how does it differ from a plain Apex method call?

A wire adapter is a reactive data-binding mechanism (used with the @wire decorator) that connects a component to Salesforce data — Apex methods, standard record data via uiRecordApi, or other built-in adapters — automatically re-fetching when its reactive parameters change, unlike a plain imperative call which only runs when explicitly invoked. See the LWC Interview Questions guide for the full wire vs imperative comparison.
Q075Consulting & Delivery

What's the difference between the Salesforce REST API and Bulk API, and when would you choose one over the other?

REST API is optimized for real-time, low-volume, synchronous operations (typically single or small batches of records with immediate response); Bulk API is optimized for high-volume asynchronous data loads (thousands to millions of records) processed in the background with job-status polling instead of an immediate response.
🔑 Key Points
Choosing REST API for a genuinely high-volume nightly data load wastes API call allocations and risks timeouts at scale — Bulk API's asynchronous, chunked processing model exists specifically to handle that volume efficiently instead.
Q076Consulting & Delivery

What's your understanding of the Salesforce multi-tenant architecture, and why does it matter for how you write Apex?

Multi-tenancy means many different customer orgs share the same underlying infrastructure and codebase, with metadata-level isolation keeping each org's data and customization separate — this is exactly why governor limits exist, protecting shared resources from any single org's inefficient code monopolizing them.
🔑 Key Points
Understanding *why* governor limits exist (protecting shared infrastructure, not arbitrary restriction) tends to produce more resilient code than just memorizing the specific limit numbers — a developer who understands the underlying reason writes bulk-safe code by instinct rather than by rote rule-following.
🧠

Real-World Scenario Round

Q77–Q89 · Original architecture and delivery scenarios worth rehearsing for any Infosys-style round

Q077Scenario Round

Infosys has assigned you to a client project where the previous vendor left an org with 200+ Workflow Rules and Process Builders still active, and the client now wants everything modernized to Flow. How do you approach this migration safely?

Inventory every active Workflow Rule and Process Builder first (Salesforce Optimizer helps here), migrate them to Flow in priority order starting with the ones causing the most active issues or hitting deprecated feature warnings, and run both the old and new automation in parallel with the old one deactivated (not deleted) during a validation window before fully retiring it.
🔑 Key Points
Never delete the legacy automation immediately after building its Flow replacement — deactivating and keeping it available for a short validation window means you can quickly re-enable it if the Flow replacement surfaces an edge case the original logic silently handled.
Q078Scenario Round

A client's Salesforce org integrates with 3 different downstream systems, and a recent Apex deployment broke one of those integrations in Production without any lower-environment integration test catching it. How do you prevent this going forward?

Establish integration-specific test coverage using HttpCalloutMock for each downstream system's expected response shape, and add a pre-deployment checklist step specifically verifying Named Credentials/Remote Site Settings exist correctly in the target environment — the most common real cause of "worked in every lower env, broke in Prod" integration failures.
🔑 Key Points
Standard Apex unit tests routinely achieve 75%+ coverage while still completely missing integration-specific failure modes, since a mocked callout test proves the Apex code runs, not that the actual downstream contract still matches — both types of validation are needed together.
Q079Scenario Round

You're brought onto an existing Infosys-managed account where the client complains that every small change request takes weeks to deploy. How do you diagnose and improve this?

Audit the current deployment process end-to-end (likely still using manual Change Sets), and if so, propose migrating to a proper CI/CD pipeline (Salesforce DX plus a tool like Copado or GitHub Actions) with automated testing — the single biggest lever for cutting deployment turnaround time on a legacy manual process.
🔑 Key Points
Before proposing any tooling change, quantify the current actual bottleneck first — sometimes the slowness is genuinely the deployment mechanism, but sometimes it's an under-resourced UAT/sign-off step that a faster deployment pipeline alone won't fix.
Q080Scenario Round

A client's Account object has grown to 180 fields over several years of ad hoc requests, and users are complaining the page is unusable. How do you approach cleaning this up without breaking existing automation?

Audit actual field usage (via Field Usage reports or a metadata-analysis tool) to identify genuinely unused fields, use Dynamic Forms to progressively disclose fields based on relevance rather than showing all 180 at once, and only deprecate/remove fields after confirming zero references in Apex, Flow, formulas, and reports.
🔑 Key Points
Removing a field that still has a hidden formula-field or report dependency is a classic self-inflicted outage — a thorough dependency check (Salesforce's own "Where is this used?" tooling) before any deletion is non-negotiable, not optional due diligence.
Q081Scenario Round

Your team inherits a client org where a critical nightly Batch job has been silently failing for two weeks with no one noticing, because there was no failure alerting in place. How do you fix this and prevent recurrence?

Add explicit failure monitoring — either a scheduled Apex job checking AsyncApexJob status and emailing on failure, or a native Salesforce "Apex Exception Email" configuration — and retroactively assess what business impact the two weeks of silent failure actually caused before declaring the fix complete.
🔑 Key Points
Silent automation failure is one of the most dangerous classes of production issue precisely because nothing visibly breaks — proactive failure alerting isn't a nice-to-have for any business-critical scheduled job, it's a baseline requirement that should exist from day one of building it.
Q082Scenario Round

A client wants a single Opportunity Stage picklist shared across three different business units, but each business unit wants slightly different stage names for the same underlying pipeline concept. How do you resolve this?

Use Record Types per business unit with distinct picklist value sets scoped to each — the underlying StageName API values (and their forecast category mapping) can stay unified for reporting purposes, while each business unit sees only their own relevant, appropriately-named subset of values.
🔑 Key Points
Preserve the ForecastCategory mapping consistently across all three Record Types' picklist values even if the display labels differ — that's what keeps cross-business-unit pipeline reporting meaningful despite each unit seeing different label text.
Q083Scenario Round

During a code review, you notice a colleague's trigger performs a SOQL query inside a for loop, but it passes all existing test cases because the tests only insert 1-2 records at a time. How do you handle this?

Flag it in review regardless of passing tests — bulk-safety issues frequently pass single-record tests while failing catastrophically at real data-load volume, so add or request a bulk test case (200+ records) specifically designed to surface the governor-limit violation before it ships.
🔑 Key Points
Test coverage percentage and bulk-safety are two completely different things — a trigger can have 100% code coverage from single-record tests and still fail immediately the first time someone does a genuine bulk data load, which is exactly the gap a dedicated bulk test case closes.
Q084Scenario Round

A client's Community (Experience Cloud) site was recently found to be exposing more data to Guest Users than intended, discovered by an external security researcher rather than internal testing. How do you both fix the immediate issue and prevent this class of bug going forward?

Immediately audit and tighten the Guest User Profile's object/field permissions to the minimum required for the public pages to function, then establish a standing practice of testing every Community change logged out in an incognito window specifically simulating the Guest User perspective before any release.
🔑 Key Points
Guest User security testing needs to be a mandatory step in the release checklist for any Community-touching change, not an occasional manual spot-check — this exact class of bug is one of the most common and most damaging real-world Salesforce security incidents.
Q085Scenario Round

You're asked to estimate a project migrating a client from Classic to Lightning Experience entirely, including custom Visualforce pages and legacy Apex. What's your estimation approach?

Inventory every Visualforce page and Aura/Classic-only customization first, categorize each as "has a native Lightning equivalent," "needs LWC rebuild," or "can stay VF embedded via Lightning Out temporarily," and estimate each category separately rather than treating the whole migration as one undifferentiated block of work.
🔑 Key Points
The categorization step itself often reveals that a meaningful chunk of the perceived migration scope doesn't actually need custom rebuild work at all — many legacy VF use cases already have a native Lightning/LWC equivalent that simply needs configuration, not development.
Q086Scenario Round

A long-running Batch job processing a very large custom object (10M+ records) intermittently fails with row-lock errors specifically during business hours. How do you redesign this?

Reschedule the batch to run entirely outside business hours if possible, and if it must run during the day, reduce the scope/chunk size to shorten each individual lock window and add a retry-with-backoff mechanism specifically for row-lock failures, distinguishing them from permanent validation failures that shouldn't be retried.
🔑 Key Points
The fix here is fundamentally about *when* and *how long* each chunk holds a lock, not the batch's core business logic — this is a scheduling and chunking problem first, and only an application-logic problem if rescheduling genuinely isn't an option for business reasons.
Q087Scenario Round

A client asks whether they should build a custom LWC-based dashboard or just use native Salesforce Reports & Dashboards for an executive-facing metrics view. How do you decide?

Default to native Reports & Dashboards first — they're maintainable by any admin, require zero custom code, and cover the vast majority of executive metric-visualization needs; reach for custom LWC only when the requirement needs a genuinely custom visualization, cross-object aggregation reports can't express, or real-time interactivity beyond a dashboard refresh.
🔑 Key Points
The recurring theme across almost every build-vs-native decision in Salesforce consulting is the same: native/declarative first, custom only when there's a concrete capability gap — and that discipline is exactly what distinguishes a senior technical judgment call from reflexively defaulting to custom development.
Q088Scenario Round

You're pairing with a junior developer at Infosys who wrote a technically correct but completely unreadable 300-line trigger handler method with no comments or structure. How do you coach this without discouraging them?

Review the working logic positively first, then walk through breaking it into smaller, named private methods (each handling one clear responsibility) as a readability exercise rather than a correctness fix, framing it as "future you or a teammate maintaining this in six months" rather than criticizing the current version.
🔑 Key Points
Pairing on the *refactor* together (rather than just telling them to go fix it) both teaches the underlying principle of single-responsibility methods and builds their trust that code review feedback is collaborative, not punitive — which matters a lot for how receptive they'll be to review feedback going forward.
Q089Scenario Round

A client's Sales Cloud org has three regional teams (US, EMEA, APAC) each with different data-privacy regulatory requirements (CCPA, GDPR, and local APAC laws respectively) sharing the same Salesforce instance. How do you architect for this?

Use Record Types and Field-Level Security scoped per region for any region-specific compliance fields, implement region-aware data retention policies via scheduled Batch Apex honoring each jurisdiction's specific retention/deletion rules, and ensure Shield Platform Encryption (or equivalent field encryption) is applied consistently to any field containing regulated personal data across all three regions rather than only where one specific law happens to require it.
🔑 Key Points
Applying the *strictest* applicable regulatory standard uniformly across all three regions' shared fields is usually simpler and safer to maintain than trying to build three separate, subtly different compliance logic paths on the same underlying object.

SF Interview Pro is a free, full-stack Salesforce career platform — no signup, no paywall. Visit sfinterviewpro.com →

Test yourself on this topic
2,244 practice MCQs across 27 quizzes — 5 quizzes free, no signup
Open Practice Zone →
RK
Written by
Rajnish Kumar
Salesforce Developer · Apex, LWC, Data Cloud & AI · Building SF Interview Pro
Connect on LinkedIn ↗
Testimonials

Real feedback from real candidates

People using SF Interview Pro to prepare for Salesforce interviews
★★★★★
"Crashed multiple interviews thanks to this. Better than the paid courses I tried."
SP
Salesforce Professional
Developer
★★★★★
"No signup, no paywall. The Apex Trigger series alone got me through two rounds."
AK
Aditya K.
Salesforce Admin
★★★★★
"LWC Zero to Hero is more practical than any paid course I found."
RM
Riya M.
LWC Developer
★★★★★
"Practice Zone MCQs matched my actual interview difficulty almost exactly."
PS
Priya S.
Business Analyst
★★★★★
"Started knowing nothing. Three weeks later I had two offers."
MK
Mohit K.
Salesforce Admin
★★★★★
"Company-wise Accenture prep was scarily accurate."
SN
Sneha N.
Consultant
★★★★★
"Explains identity resolution better than official Trailhead modules."
VR
Vikram R.
Data Cloud Consultant
★★★★★
"Free and better than the paid prep I bought earlier."
TJ
Tanvi J.
Fresher
★★★★★
"Reports and Dashboards guide made a tricky topic finally click."
KP
Karan P.
Salesforce Admin
★★★★★
"SOQL Part 2 questions came up almost word for word in my interview."
AN
Ananya N.
Developer
★★★★★
"Field Service Lightning guide is the only good free resource I found."
RD
Rohan D.
FSL Consultant