CompanyMotorola
Focus AreaSalesforce Developer
Questions14+
Topics2
Motorola Solutions Salesforce Developer L1 interview questions shared by a candidate with 3.5+ years of experience (updated Oct 2026). The questions cover the data security model, triggers, hierarchy SOQL queries and LWC fundamentals.
What's Covered
Topics covered in these interviews.
01Security, Apex & Triggers7
02Lightning Web Components7
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.
Security, Apex & Triggers
1Have you used with sharing and without sharing in Apex?
2In what cases do we use before and after triggers?
3Explain the data security model.
4In the same hierarchy, write a SOQL query on F that fetches details from A (name and Ids).
5Introduce yourself and describe your journey in Salesforce and the projects you worked on.
6Write a trigger so that when a new Contact comes in with an email, or its email changes, the AccountEmail__c field on the related Account is updated with that email only if AccountEmail__c has no value yet.
7Objects A, B, C, D, E and F are in a hierarchy with A at the top and F at the bottom. Write a SOQL query on A that fetches details from F (name and Ids).
Lightning Web Components
8What are public properties and public methods in LWC and what is their usage?
9Print the top n Accounts filtered by last modified date in an LWC as a list. The value of n is passed from JS.
10What is shadow DOM?
11Tell me about the lifecycle hooks of LWC components.
12What differences did you find between LWC and Aura?
13What is a lightning data table?
14How many types of events do we have in LWC? What are the phases of events, and what are application events?
Preparing for a Salesforce developer interview?
Browse more real company interview experiences and hands-on Apex trigger patterns.
Quick answers to key questions
Short answers to the questions above, so you can revise quickly before an interview.
Security, Apex and triggers
- With sharing and without sharing. A class declared
with sharingrespects the sharing rules of the running user. A class declaredwithout sharingignores them and can see all records.inherited sharinguses the setting of the calling class. Always declare the keyword on purpose instead of relying on the default. - Before and after triggers. Use a before trigger to validate data or change fields on the record being saved, because no extra DML is needed. Use an after trigger when you need the record Id or want to create or update related records.
- Data security model. Access is controlled in layers. At the org level there are login hours, IP ranges and password policies. At the object level, profiles and permission sets give create, read, edit and delete access. At the field level, field-level security controls visibility. At the record level, OWD, role hierarchy, sharing rules, manual sharing and teams decide which records a user can see.
Trigger: update AccountEmail__c from a Contact
Collect the Accounts of the Contacts that have a new or changed email, query those Accounts once, and update only the ones where AccountEmail__c is empty.
trigger ContactEmailTrigger on Contact (after insert, after update) {
Map<Id, String> emailByAccount = new Map<Id, String>();
for (Contact c : Trigger.new) {
if (c.AccountId != null && c.Email != null) {
if (Trigger.isInsert || c.Email != Trigger.oldMap.get(c.Id).Email) {
emailByAccount.put(c.AccountId, c.Email);
}
}
}
if (emailByAccount.isEmpty()) return;
List<Account> toUpdate = new List<Account>();
for (Account a : [SELECT Id, AccountEmail__c FROM Account
WHERE Id IN :emailByAccount.keySet()]) {
if (String.isBlank(a.AccountEmail__c)) {
a.AccountEmail__c = emailByAccount.get(a.Id);
toUpdate.add(a);
}
}
update toUpdate;
}SOQL on a hierarchy of objects (A to F)
- From F up to A (child to parent). Use dot notation through the lookup fields. SOQL allows up to 5 levels, and A is 5 levels above F, so it fits. For example
SELECT Id, Name, E__r.Name, E__r.D__r.Name, E__r.D__r.C__r.Name, E__r.D__r.C__r.B__r.Name, E__r.D__r.C__r.B__r.A__r.Name FROM F__c. The relationship names depend on your fields. - From A down to F (parent to child). Use nested subqueries on the child relationship names. Recent API versions allow several levels of nested subqueries, so check the limit for the API version you use.
Lightning Web Components
- Public properties and methods. A property or method marked with
@apiis public. A parent component can set a public property through an HTML attribute and can call a public method from its JavaScript. A child should not change its own public property directly, because the parent owns that value. - Shadow DOM. It keeps the DOM and CSS of a component private, so styles do not leak in or out and other components cannot reach into its markup by accident.
- Lifecycle hooks.
constructor,connectedCallback(component added to the page),render,renderedCallback(after rendering),disconnectedCallback(removed) anderrorCallback. - LWC and Aura. LWC is built on standard web components and modern JavaScript, so it is faster and easier to learn. Aura is Salesforce own older framework. You can place an LWC inside an Aura component, but not the other way round.
- Lightning datatable. A base component that shows records in rows and columns. It supports sorting, row selection, row actions, inline editing and infinite loading.
- Events in LWC. A child talks to its parent with a custom event. Events have bubbling and capturing behaviour controlled by the
bubblesandcomposedsettings. Application events belong to Aura. In LWC, unrelated components communicate through Lightning Message Service.