CompanyTech Mahindra
Focus AreaSalesforce Developer
Questions100+
Topics6
Tech Mahindra Salesforce Developer interview questions shared by candidates with 2.5 to 4 years of experience across the L1 and L2 rounds (updated Oct 2026). Questions are grouped by topic so you can revise triggers, async Apex, LWC, security, flows and integration one area at a time. Also read our earlier Tech Mahindra Salesforce interview questions.
What's Covered
Topics covered in these interviews.
01Apex Triggers & Coding24
02Async Apex & Batch14
03Lightning Web Components18
04Security, Sharing & Cloud Concepts17
05Flows, Service Cloud & Integration19
06Project & HR Round8
All Interview Questions
Every question listed one by one, in a fresh order. Answers are not included, so practise explaining each one in your own words.
Apex Triggers & Coding
1Write a trigger on Account insert that creates as many Contacts as the Number of Employees value, without a nested for loop.
2To cover a line that checks whether a record was created three years ago, how do you do it (Test.setCreateDate)?
3A trigger and a REST service: how do you call the REST service from the trigger?
4How many times does a trigger execute on an Upsert and on a Merge?
5Write a query to get Accounts having more than three Contacts.
6Can we create a roll-up between Account and Contact?
7Convert a List<Contact> to a Map<Id, List<Contact>> keyed by AccountId.
8Invoice__c is master-detail to Account. Write a trigger that updates the Account's total invoice amount when an Invoice is created, updated or deleted, handling bulk transactions.
9An Account should have only two Contacts. How can we achieve it?
10What is System.runAs?
11Explain the approach to show the number of related Contacts on an Account.
12What is System.FinalException: Record is read-only, and how do you resolve it?
13What is the SOQL 101 error, and why might it occur even when all best practices are followed?
14How do you disable a trigger for certain users?
15What is the Uncommitted work pending exception?
16Explain Trigger framework, bulkification and its points to consider.
17What is the Mixed DML exception? If a test class inserts an Account and a User in the same test setup method, will you get it?
18Why is the future method not accepting an object as a parameter, and how do you convert an sObject to primitive types?
19Which executes first: the custom validation or the before trigger? What is the difference between system and custom validation?
20Write a trigger to show the total sum of related Opportunities on the Account.
21What is the order of execution? At which instant is it called twice?
22Object A has RecordType1 and RecordType2. When a RecordType1 record is inserted, create the same record as RecordType2 and the reverse, so they stay in sync. Write the trigger.
23Whenever an Opportunity Line Item stage is closed and all line items are closed, update the Opportunity stage as closed.
24How do you append data to an Email field on insert or update? Do we need an update DML in a before trigger?
Async Apex & Batch
25Can we call a future from a batch, and a Queueable from a future or a batch?
26Have you worked on async Apex? What are the different methods of async Apex?
27How do you schedule a batch class once without using a Schedulable class (System.scheduleBatch)?
28Explain Batch Apex: how many times each method executes, stateful and its use.
29What is the difference between future and Queueable?
30Explain the interfaces used in Batch Apex. What is Database.Stateful used for?
31How do you process 70 million records daily, and how do you know how many times the batch must run?
32How do you handle exceptions in Apex?
33How do you make a callout from a batch?
34Why do we need Schedulable and Queueable classes?
35What is the use of enqueueJob?
36Why can't we call a future from a batch?
37Explain how to write a test class for a Batch class.
38How do you get success and failure record information in emails from a batch?
Lightning Web Components
39Parent-to-child and child-to-parent communication in LWC, and between unrelated components.
40When do you use the === operator?
41What is LMS?
42With security enforced, will FLS or sharing rules apply?
43I deployed an LWC successfully but it is not available for use in the org. What could be the reason?
44What is the difference between wire and imperative calls?
45When do we use cacheable=true?
46What is the difference between connectedCallback and renderedCallback?
47What is lazy loading and how is it implemented?
48How can a backend change reach the UI without a page refresh?
49What are decorators and when do you use which?
50What is an imperative Apex call?
51Write code to show data in a datatable with a plus-icon button that inserts a blank, highlighted row for the user to fill in and save.
52An LWC is on the page and must be visible only to users whose checkbox is true. How?
53An Apex class queries Account and an LWC displays the records. Will it show all records or only those the user can access?
54Explain Lightning Web Component lifecycle hooks.
55Can we have multiple HTML files in an LWC component? Which one is displayed? Can we have multiple JS files?
56What is the difference between Aura and LWC?
Security, Sharing & Cloud Concepts
57How do you implement object-level and field-level security in Apex?
58We reached the field creation limit on the Account object. What can we do?
59Have you worked on any AppExchange product?
60What is the difference between freezing and deactivating a user?
61What are field sets?
62What is a sharing rule? Sharing rules are implemented but a record that meets the criteria is not shared with the group. How do you debug?
63What is the difference between with sharing and without sharing?
64What is a Junction Object and how do you identify its primary parent?
65What are the differences between Metadata Types, Custom Settings and Custom Objects?
66What is the difference between Role and Profile?
67What is a Guest user in Community Cloud?
68Explain the record-level security features.
69What are the types of relationships in Salesforce? Can you do a roll-up summary on a Date field?
70What is a custom permission and its use?
71What is the relationship between Pricebook and Product, and between Opportunity and Product?
72How does manual sharing work and how do you enable it?
73A user has all permissions on the object and records but cannot find it in global search. Why?
Flows, Service Cloud & Integration
74How do you call an LWC through a flow, step by step?
75What about campaign, lead and web-to-lead?
76What are web services?
77A data migration makes a flow fail and users get failure emails. How do you start debugging?
78What is the difference between Flow and Trigger, and what are the limitations of flows?
79What is the difference between Autolaunched flow and Record-Triggered flow, and what is the Decision element?
80An assignment rule assigns Cases to a queue. If the Case is manually assigned from the queue to a user, does the assignment run again? How do you reassign it and what are the implications?
81How do you map Lead fields to Opportunity (Map Lead Fields)? What is the lead conversion process?
82Create a flow that creates records of an object based on User or Geography. Which flow type?
83Can we pass a parameter from Apex to a flow?
84What are the prerequisites for inbound and outbound integration?
85What are the types of flows? Explain Platform Events in flows.
86Records come from Get Records and DML must run on all of them. How?
87Have you worked on Sales Cloud and Einstein Bots? What are Entitlements?
88Have you worked on integration? What are HTTP methods, and how do you send the content type in a callout?
89What is the difference between PATCH and PUT, and can we update using POST?
90Do you use any tool other than change sets and VS Code for deployment?
91What is the difference between Email-to-Case and Web-to-Case, and what are auto-response rules?
92What is Gamification in Experience Cloud?
Project & HR Round
93What are the major features and how many custom objects are in your project?
94How would you rate yourself in Apex?
95Explain your project, the client's business requirement and your roles and responsibilities.
96What is the best practice for writing triggers?
97You must do a POC and the client asks for changes in two days when you need four or five. How do you buy time?
98Have you been on a one-to-one client call?
99What is one cool thing you can teach me in Salesforce?
100Explain your project and your day-to-day activities.
Preparing for a Salesforce developer interview?
Browse more real company interview experiences and hands-on Apex trigger patterns.