Cracked My Accenture Interview:
Top Salesforce Questions & How I
Answered Them
Q1. How Do You Handle Errors in Apex?
They challenged me:
“What happens if something goes wrong in your Apex code?”
My answer 👇
🔹 I use try-catch blocks to gracefully handle exceptions.
🔹 Log errors using System.debug() or custom error logging objects.
🔹 I always provide meaningful error messages to users or admins.
Tip: Avoid exposing sensitive details in error messages.
Q2. Can You Call a Flow from Apex?
They asked:
“How do you launch a Flow programmatically?”
I shared 👇
🔹 Use Flow.Interview class or FlowInterview.start() in Apex.
🔹 Works for autolaunched flows that take input/output variables.
🔹 Useful when Flow needs to be triggered in Apex-heavy logic.
Tip: Ensure the Flow API name is correct and handle null outputs.
Q3. How Do You Handle Large Data Volumes in Apex?
Classic challenge:
“What if there are millions of records?”
Here’s my response 👇
🔹 Use Batch Apex to process in chunks of 200 records.
🔹 Leverage QueryLocator to handle >50K records.
🔹 Use indexing, selective filters, and query planning.
Tip: Mentioned using SOQL Query Plan tool to optimize queries.
Q4. When to Use Platform Events?
They asked:
“How would you design an event-driven solution?”
My approach 👇
🔹 Use Platform Events for real-time communication between
decoupled components.
🔹 Ideal for external integrations or async internal processing.
🔹 Subscribers: Flows, Apex triggers, or external systems.
Tip: Platform Events are publish-subscribe, not guaranteed delivery
unless durable.
Q5. Difference Between Trigger.new and Trigger.old?
They tested my fundamentals:
“What’s the difference and when do you use each?”
Here’s my breakdown 👇
🔹 Trigger.new: Contains new versions of the records.
🔹 Trigger.old: Holds the previous values (for update/delete only).
🔹 Used to compare changes and prevent unwanted updates.
Tip: Trigger.old is read-only — don’t try to modify it!
Q6. How Do You Secure Lightning Components?
Security check:
“How do you prevent exposing data in LWC?”
I answered 👇
🔹 Use Apex with @AuraEnabled(cacheable=true) only when
needed.
🔹 Validate user access in Apex using with sharing and field-level
security.
🔹 Don’t expose internal logic or sensitive data in JS.
Tip: Use Lightning Locker (now Lightning Web Security) for
enforced isolation.
Q7. What’s the Difference Between Role Hierarchy and Sharing
Rules?
Org-wide defaults question:
“Explain how access is controlled?”
My reply 👇
🔹 Role Hierarchy: Grants access upward to superiors.
🔹 Sharing Rules: Expand access horizontally across roles or
groups.
🔹 Use both for scalable and secure sharing logic.
Tip: Mentioned using OWD + Sharing Rules for most control.
Q8. When to Use Queueable vs Future Methods?
Async Apex question:
“When would you use Queueable instead of @future?”
My thoughts 👇
🔹 Queueable: More flexible — supports chaining and complex logic.
🔹 @future: Simple, but limited — no return values or chaining.
🔹 Prefer Queueable for bulk processing or dependent jobs.
Tip: Queueable classes can implement Database.AllowsCallouts too.
🚀 Ready to level up?
Don't miss out on exclusive insights, resources,
and more!
👇 Follow us for the latest updates 👇
🔗 Visit us now:
https://trailheadtitans.com/product/salesforce-
notes/