Salesforce Questions
Salesforce Questions
A Sandbox in Salesforce is a replica of your production environment where you can develop,
test, and train without affecting your live environment. It allows you to safely make changes and
experiment with new features.
Cloud Computing refers to the delivery of computing services like servers, storage, databases,
networking, software, and analytics over the internet (the cloud), offering flexibility, scalability,
and cost-effectiveness.
3. What is IaaS?
IaaS (Infrastructure as a Service) provides virtualized computing resources over the internet.
It offers fundamental infrastructure components like computing power, storage, and networking,
without the need to own physical hardware (e.g., AWS EC2, Google Compute Engine).
4. What is PaaS?
PaaS (Platform as a Service) delivers a platform that allows customers to develop, run, and
manage applications without managing the underlying infrastructure. Examples include
Salesforce’s platform, Google App Engine, and Heroku.
5. What is SaaS?
SaaS (Software as a Service) is a software delivery model where applications are hosted by a
service provider and made available over the internet. Examples include Salesforce, Gmail,
Dropbox, and Microsoft 365.
A Junction Object is a custom object used to create many-to-many relationships between two
objects. It contains two Master-Detail relationships to other objects.
● Role: Defines the visibility of data across the organization (who can see what).
● Profile: Controls the user’s permissions and access to various features (read, write,
modify, delete).
Sharing Rules are used to grant access to records for users in roles or public groups, based on
record attributes. They can be criteria-based or owner-based.
Manual Sharing allows users to share individual records with other users, groups, or roles if
they do not have access via their profile or sharing rules.
Apex Sharing enables developers to create custom sharing logic using Apex code, allowing
more complex and dynamic sharing rules based on business logic.
● Flow: Ideal for declarative, low-code solutions for automating business processes, and
when you need easy-to-maintain solutions.
● Apex: Used when the logic cannot be achieved through Flow, such as complex
integrations or when performance is critical.
Apex is a strongly typed, object-oriented programming language for the Salesforce platform.
Use Apex when:
18. What is Apex Trigger? and When should we use Apex Trigger?
An Apex Trigger is a piece of code that runs before or after specific operations (like insert,
update, delete) on Salesforce records. Use triggers when:
The Apex Trigger Handler Pattern is a design pattern where trigger logic is separated into
handler classes, promoting cleaner code and better maintainability. It centralizes trigger logic
into a handler method and allows you to manage all logic in one place.
20. What is Apex Trigger Framework? What are different Trigger Frameworks available in
Salesforce?
The Apex Trigger Framework is a design pattern that enables scalable and reusable trigger
code by using handler classes. Some popular frameworks include:
21. What is Async Apex in Salesforce? How many ways do we have for Async
processing?
Async Apex is a mechanism for processing data asynchronously (in the background) to avoid
blocking the main thread. It is used for time-consuming operations.
1. Future Methods
2. Queueable Apex
3. Batch Apex
4. Schedulable Apex
Batch Apex allows you to process large amounts of data asynchronously in smaller chunks. It
is used for handling records in batches (e.g., processing 50,000 records at once).
23. What is the difference between Stateful and Stateless batch job?
● Stateful Batch: Retains the state of variables between executions of the execute()
method.
● Stateless Batch: Does not retain any state information, making it more scalable but
requiring reinitialization of variables in each execution.
Mixed DML occurs when there are data manipulation operations involving both Setup and
Non-Setup objects in a single transaction. Salesforce does not allow mixed DML operations due
to security and consistency reasons.
25. What is Lightning Data Service?
Lightning Data Service is a service in Salesforce Lightning that simplifies the process of
working with Salesforce data in Lightning components, providing caching and automatic
synchronization without the need for Apex code.
27. How to call Apex class in Lightning Web Component and how many ways we have
and when to use which option?
Use @wire when you need reactive data binding and imperative calls when you need finer
control over when the Apex is invoked.
28. What are the basic differences between Application Event and Component Event in
Aura components?
Lightning Messaging Service (LMS) is used to communicate across components, apps, and
pages, even if they are in different namespaces or domains.
30. What is lazy loading in LWC and how do you implement lazy loading in LWC?
Lazy loading in LWC is a performance optimization technique where content or data is loaded
only when it’s required. This can be done using the IntersectionObserver API to detect
when an element enters the viewport.
Design Attributes are used in Lightning Web Components to expose attributes that can be
customized in the Lightning App Builder or Page Builder.
Web Services are a set of protocols used to allow applications to communicate over the
internet. It allows different systems to exchange data using standard formats such as XML,
JSON, etc.
● SOAP: A protocol that defines a strict message format and requires a standard set of
rules (XML-based).
● REST: An architectural style that is more flexible, using HTTP and can return responses
in multiple formats (JSON, XML).
34. What is the difference between Enterprise WSDL and Partner WSDL?
Integration patterns in Salesforce provide best practices for integrating Salesforce with external
systems. Examples include:
● Outbound Messaging
● Apex Web Services
● Platform Events
● External Services