SOQL:
- Write a query that returns the Account Name and its related Opportunity count.
- Write a query that returns the second-highest Opportunity with its amount.
- Write a query that fetches Accounts and their related Contacts count.
- Write a query to fetch Opportunities related to Accounts.
- I want to query custom object data that respects org settings.
APEX:
- Write an Apex class that returns Account data to an LWC so that we can call it using an imperative call.
- Write an Apex method for outbound data transfer.
- Write an Apex method that receives inbound data and stores it in an object.
- Write an Apex class that calls an external API.
- Write an Apex method that creates five Account records.
- Can we call the Apex class from a Flow? How?
- What is "with sharing" and "without sharing"?
- Can we insert an Account, related Contact, and related User in one class? If not, why?
- What annotation is used when we need to pass data to an LWC?
- What are the different types of context variables in triggers?
- When do we use List, Map, and Set in Salesforce?
- When do we use triggers over Flows?
- How do we secure API credentials and access in Apex?
Scenario-Based Apex:
- Scenario: My org has 200 records, but when I return data using the below call, I’m getting only 20 records. What is the issue in my class? Why does it return only 20 records?
public class FetchData {
public Map<Datetime, Account> returnAccountData() {
List<Account> accList = [Select Id, Name, CreatedDate from Account Where CreatedDate != null];
Map<DateTime, Account> accMap = new Map<DateTime, Account>();
for (Account acc : accList) {
accMap.put(acc.CreatedDate, acc);
}
return accMap;
}
}
Async Apex:
- What is the difference between future and queueable methods? Which is more scalable and why?
- Can we call one future method from another? Why?
- What is the return type of a future method?
- If we need to call an API from a future method, which annotation is required?
- What can be done from a future method that is not possible from a queueable method? If yes, then how?
- Can we call a batch class from a queueable class?
- How much job chaining can we do in a queueable method?
LWC (Lightning Web Components):
- What are @API, @track, and @wire in LWC?
- What are the lifecycle hooks in LWC? Explain each.
- Can we use @api and @track on the same variable? Why or why not?
- How does communication happen between Parent and Child components, and vice versa?
- How do we communicate between unrelated components?
- I need to create an LWC component and deploy it on the Account record page. Whichever Account record page I deploy this component on, it should work dynamically. Also, when I change any data in the Account, the change should be reflected in the component without refreshing the page. How do we achieve this?
- What are the ways to fetch data in LWC?
- What is LDS (Lightning Data Service), and what is it used for?
- Write an imperative method in LWC that fetches data from Apex and is called when the page is refreshed.
- Call an Apex method imperatively and display Account data with related Contact information in the UI.
- How can we call an external API in LWC?
Admin:
- What is the security model of Salesforce?
- What are the different ways to share records in Salesforce?
- We have three different regions, and we need to show different fields to users from each region. How do we do this?
- We have an action button on the Account record page. When clicked, it opens a modal with a data table showing Account data. Can you explain how this works?
- We have a Boolean field in a custom metadata object. If this is true, then the email field on Account is mandatory. If false, the email field is optional. If true and the user doesn't provide an email, how do we show an error on the field or page?
- We have two users with the same role and profile, but one of them is not able to see Opportunities. What could be the issue?
- Can we restrict permissions using Permission Sets?
- What are Remote Site Settings in Salesforce?
- What is Named Credentials? If we set Named Credentials, do we still need to set Remote Site Settings?
- Create a flow: When a new Account is created, increment the count by one and update the Account's description.
- What are Custom Settings used for? What are the different types of Custom Settings?
- What is an Account, Contact, Opportunity, and Lead in Salesforce?
- What are the different types of relationships in Salesforce?
- What is a Junction Object, and have you worked with one? If yes, explain it.
- What are the different types of Flows? Which types have you worked on?
- What does a Platform Event Trigger Flow do?
- Explain the entire Lead process in Salesforce.
- Explain the entire Case process in Salesforce.
Experience Cloud:
- How do I publish a component on Experience Cloud?
- I want to capture data from an LWC component that I deployed on Experience Cloud. Explain the flow for capturing and processing the data.
- If a user is able to access and interact with my website, what settings do I need to configure?
- What is the Guest User Profile, and how do we provide access to a Guest User for Apex classes and other resources?
Scenario-Based Questions:
- If you're working as a developer and an email is fired from your org regarding a query, but the user says they didn’t receive any email, how do you handle it?
- If your client reaches out and says, "I want this functionality," but you're not familiar with it, how do you handle the situation? What would you say to satisfy the client?
- If you want to integrate something and there is no documentation available, what approach would you take to complete the integration?
- If you're working on something and encountering an error, and you've tried everything else, what would you do to solve it?