70 PwC Salesforce Interview Questions & Answers (2025–2026)
Real PwC Salesforce Developer interview questions with years of experience tagged — plus scenario-based rounds and LWC deep-dive questions to round out your prep
Triggers & Coding Round
Q1–Q10 · Write-the-code questions asked at PwC across 2025–2026 rounds
Write a trigger to count the number of Contacts associated with an Account, using an aggregate query specifically.
Other than an aggregate query, what are the different approaches to find the number of Contacts associated with an Account?
acc.Contacts.size() works but only after querying the parent with a subquery, and doesn't scale well for very large child counts.You have 4 Batch Apex jobs running. Write code that gives you the total number of records processed and total failed records across all 4 batches combined.
Account and Subscriber are related objects. Subscriber has a checkbox "Recent Subscriber" — the most recently added Subscriber per Account should be true, all others false. When that Subscriber is deleted, the next most recent one should get flagged true instead.
Write a trigger to prevent a user from deleting an Account if any Opportunity record is associated with it.
Write a trigger on Order Product so the Account's "Most Sold Item" picklist gets updated with whichever product has the highest total quantity sold for that Account.
Trigger — whenever a Contact is inserted, updated, or deleted (related to an Account), update a field Total_Contacts_Count__c with the latest count. Candidate used a List with multiple if-statements to find AccountIds; interviewer pushed back and asked to use a Map to optimize.
Write a trigger — if the Owner of an Account is changed, the Owner of the related Contacts should also be updated to match.
On Account and Opportunity there's a Test__c field. Whenever an Opportunity related to the Account is inserted or deleted, concatenate Opportunity.Test__c onto Account.Test__c.
PwC pastes 6 short code snippets and asks: what is the output/behavior of each? (list index access, SOQL WHERE with no match, before-vs-after trigger record mutation, nested query inside a loop, after-delete field access, Map.get() returning null.)
accs[0] on an empty List → ListException: index out of bounds.SOQL with no matching row and no LIMIT wrapper assigned directly to a single sObject variable → List has no rows for assignment exception.
Mutating Trigger.new fields in an after update trigger then calling update again → throws because records are read-only in after-context; that update must happen in before-context instead.
SOQL inside a for-loop over Trigger.new → classic SOQL-in-a-loop governor limit risk (101 query error at scale).
Accessing a field on a record inside an after delete trigger works fine for read (Trigger.old is available), but attempting DML on the deleted record itself fails.
Map.get() on a missing key returns null, not an exception — but the very next line dereferencing that null (e.g. .Industry) throws a NullPointerException.Lightning Web Components (LWC) Round
Q11–Q18 · Life cycle, wire vs imperative, and hands-on component building
Can we call refreshApex() inside the renderedCallback() lifecycle hook in LWC? Why or why not?
Why do we use a constructor in Lightning Web Components?
What is Lightning Message Service (LMS) and when do we use it? How is it different from the old pub-sub model?
When should you use @wire with Apex versus calling it imperatively?
Explain the difference between a Wire method and an Imperative Apex call in more depth — including caching behavior.
Explain the LWC lifecycle in order, and mention where the DOM actually gets updated.
Write the syntax for querySelectorAll in LWC.
this.template, not the global document — LWC's shadow DOM boundary means document-level selectors won't reach into the component. Use data-* attributes rather than id, since ids can get transformed at render time.Write an LWC component with two buttons — "Select All" and "Deselect" — that toggle checkbox selection across an HTML table or datatable of records.
Security Model & Sharing
Q19–Q26 · Record visibility, manual sharing, and Experience Cloud access
A user says they can't see a record they should have access to. What's your debugging approach?
The manual Share button isn't visible on a record's page layout. What could be the reason?
What is manual sharing in Salesforce?
Apex classes run "without sharing" by default anyway — so why bother explicitly writing the "without sharing" keyword?
Explain the Salesforce security model at a high level, and how organization-level security fits in.
A Community/Experience Cloud user should only be able to see records they personally created — by default, if they create a Case, the Owner might be someone else. How do you achieve this?
What security considerations come up specifically on the Experience Cloud (community) side of an implementation?
How do you stop triggers or Flows from firing during a large data load, such as a migration?
Async Apex & Batch Processing
Q27–Q34 · Batch internals, CPU limits, and the FSC-round batch scenario
What is the return type of the start() method in Batch Apex?
You have a scheduled Batch job. How do you skip one specific batch execution, or skip a specific record within a batch, without any manual intervention?
How do you bypass a Validation Rule for one specific user, without disabling it for everyone?
Why does "Apex CPU time limit exceeded" happen, and what kinds of operations actually count against it?
A custom object has a Status field (Active/Inactive) and an Expire Date field. Whenever the Expire Date is in the past, Status should flip to Inactive — checked daily via a scheduled batch. Walk through your approach.
Why should you favor a Map over a List in many trigger optimization scenarios?
Difference between a Future method and Queueable Apex?
Why is it not possible to pass a List of sObjects to a future method? What's the actual reason behind this restriction?
Integration & Platform Events
Q35–Q39 · OAuth, Named Credentials, and secure data exchange
Difference between OAuth 1.0 and OAuth 2.0 in Salesforce.
Difference between Remote Site Settings and Named Credentials in Salesforce.
What is a Refresh Token used for in an integration?
What are Platform Events and where do you use them?
How do you make sure your integration isn't leaking data to a system that shouldn't have access to it?
Financial Services Cloud & Experience Cloud
Q40–Q44 · Industry-cloud-specific rounds PwC runs for FSC/Community projects
What is a Person Account, and why would a client need it?
Out of 100 Accounts in the org, how do you identify which ones are Person Accounts, and query for Person Accounts created in the last 4 days?
Explain ARC (Actionable Relationship Center) in FSC, and what an Action Plan is used for.
Explain Email-to-Case, and how you'd display the complete email thread directly on the Case record page.
Flow vs Trigger — walk through exactly when you'd use one over the other.
LWC Deep Dive
Q45–Q57 · Reactive binding, performance, testing, and security in custom components
When and why would you use renderedCallback() specifically, instead of connectedCallback()?
How does reactive data binding work in LWC?
How would you implement conditional rendering based on dynamic data?
How do you communicate between sibling components in LWC that share a common parent?
How can you make an LWC datatable editable and persist the changes back to Salesforce?
Describe how you'd handle pagination in an LWC component showing thousands of records.
How would you optimize component performance when working with large datasets in LWC?
Beyond large datasets specifically, what general strategies would you employ to enhance LWC performance?
What are the considerations for handling server responses and errors when calling Apex imperatively from LWC?
How do you debug performance issues in LWC components?
What tools and techniques do you use for testing LWC components?
What security considerations should be taken when building custom functionality in LWC?
How do you ensure compliance with CRUD, FLS, and sharing rules specifically when an LWC calls Apex?
Real-World Scenario Round
Q58–Q67 · Architecture-style scenarios worth rehearsing before any senior Salesforce interview
Your client runs three different retail brands on one Salesforce org, and each brand wants its own picklist values, page layouts, and approval process — but shares the same Account and Opportunity objects. How do you design this?
Sales leadership wants to realign territories mid-quarter, reassigning 3,000 Accounts to new owners overnight without disrupting active deals. Walk through your rollout plan.
An outbound integration to a shipping partner's API fails intermittently due to timeouts, and you're seeing duplicate shipment records created on retry. How do you fix this?
Support SLAs are calculated as a simple 24-hour countdown on Case, but leadership now wants the countdown to pause on weekends and company holidays. How do you implement this without breaking existing reports?
Marketing just ran a campaign that created 2,000 duplicate Leads for people who already exist as Contacts. How do you clean this up without losing campaign attribution?
You need to mass-reparent 10,000 Contacts to different Accounts as part of a data cleanup, but Account has several roll-up summary fields that depend on Contact counts. How do you avoid corrupting those rollups?
Approval routing today is one hardcoded approver, but the business now wants routing to vary by deal size AND region — small EMEA deals need one approver, large APAC deals need a different chain entirely. How do you design this to stay maintainable?
A multi-currency org's Opportunity roll-up totals on Account look wrong for international customers — the numbers don't match what finance expects. What's likely going on, and how do you fix it?
Partner portal users are reporting they can see Opportunities belonging to other partner companies, not just their own. Where do you start investigating, and how do you fix it?
A nightly batch job that recalculates pricing across 500,000 Product records sometimes overlaps with the start of business hours in APAC, causing Row Lock errors for live users editing Opportunities. How do you resolve this?
A Few More From the Field
Q68–Q70 · Additional questions worth having ready
You want to clone an Opportunity along with all of its related Contact Roles. How do you handle the deep clone?
Can you call a @future method from another @future method?
You're building a configurable solution whose behavior needs to differ across Dev, QA, and Production. Would you use Custom Settings or Custom Metadata, and why?
SF Interview Pro is a free, full-stack Salesforce career platform — no signup, no paywall. Visit sfinterviewpro.com →
Practice with real people
Join the free Mock Interview Community — practice with peers, get honest feedback, and walk into your real interview confident.
Join the Community ↗