0% found this document useful (0 votes)
26 views8 pages

Salesforce Questions

Uploaded by

Suraj Rawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views8 pages

Salesforce Questions

Uploaded by

Suraj Rawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

1. What is Sandbox, and what is the type of Sandbox in Salesforce?

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.

Types of Sandbox in Salesforce:

● Developer Sandbox: A personal environment used by developers to build and test.


Limited data and storage.
● Developer Pro Sandbox: Similar to Developer Sandbox but with more storage space.
● Partial Copy Sandbox: Includes a subset of production data, useful for testing with
realistic data.
● Full Sandbox: A complete replica of the production environment, including all data,
configuration, and customizations.

2. What is Cloud Computing?

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.

6. Types of Object Relationship in Salesforce?

Salesforce provides several types of relationships to link objects:

● Master-Detail Relationship: A tight relationship where the child record’s lifecycle


depends on the parent (e.g., Opportunity and Opportunity Products).
● Lookup Relationship: A looser relationship where the child record can exist
independently of the parent (e.g., Account and Contact).
● Many-to-Many Relationship: Implemented using a Junction Object, which links two
objects with two Master-Detail relationships.
● Hierarchical Relationship: A special type of Lookup relationship available only for the
User object.

7. What is Junction Object in Salesforce?

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.

8. What is the difference between Role and Profiles?

● 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).

9. How many ways do we have in Salesforce for Sharing?

In Salesforce, sharing can be done in the following ways:

1. Organization-Wide Default (OWD)


2. Role Hierarchy
3. Sharing Rules
4. Manual Sharing
5. Apex Sharing
10. What are Sharing Rules?

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.

11. What is Manual Sharing?

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.

12. What is Apex Sharing?

Apex Sharing enables developers to create custom sharing logic using Apex code, allowing
more complex and dynamic sharing rules based on business logic.

13. Types of Flow in Salesforce?

Salesforce Flow can be classified into:

1. Screen Flow: Used to collect data from users through screens.


2. Auto-launched Flow: Runs in the background and doesn’t require user interaction.
3. Scheduled Flow: Runs at a specific time or interval.
4. Platform Event-Triggered Flow: Runs based on events being published.

14. When to use Flow vs Apex?

● 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.

15. Best practices for Salesforce Flow?

● Use Variables to store values and avoid repeating logic.


● Break flows into smaller subflows for maintainability.
● Test thoroughly in Sandboxes.
● Avoid long-running or complex flows.
● Use Error Handling in flows to catch and handle issues.

16. What is Apex? and when to use Apex over Flow?

Apex is a strongly typed, object-oriented programming language for the Salesforce platform.
Use Apex when:

● Business logic is too complex for Flow.


● Integrations with external systems are required.
● Performance considerations (e.g., bulk processing) demand Apex over Flow.

17. What are Apex Best practices in Salesforce?

● Bulkify your code to handle large data volumes.


● Use SOQL and SOSL queries efficiently to avoid hitting governor limits.
● Avoid hardcoding IDs or values; use Custom Settings or Custom Metadata Types.
● Write unit tests to cover Apex logic.

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:

● Complex business logic needs to be applied at the record level.


● Operations cannot be achieved using declarative features like Workflow or Process
Builder.

19. What is Apex Trigger Handler pattern?

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:

● The Trigger Framework by Salesforce: It organizes trigger logic in a handler class.


● The Trigger Framework by Mulesoft: Focuses on managing bulk operations and
simplifies debugging.

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.

Ways for Async processing:

1. Future Methods
2. Queueable Apex
3. Batch Apex
4. Schedulable Apex

22. What is Batch job in Salesforce?

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.

24. What is mixed DML?

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.

26. How do you communicate between Lightning Web Components?

Communication between LWC can be done using:

● Custom Events (parent to child or sibling components).


● Public Properties (passing data to a child component).
● Lightning Message Service (cross-namespace communication).

27. How to call Apex class in Lightning Web Component and how many ways we have
and when to use which option?

You can call Apex in LWC using:

1. @wire: To call Apex methods that return data asynchronously.


2. Imperative Apex: To call Apex methods imperatively (e.g., for specific use cases like
creating or updating records).

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?

● Application Event: Used for communication across different components in the


application (e.g., between different pages).
● Component Event: Used for communication within a single component hierarchy
(parent-child relationships).

29. What is Lightning Messaging Service?

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.

31. What are Design Attributes in Lightning Web Components?

Design Attributes are used in Lightning Web Components to expose attributes that can be
customized in the Lightning App Builder or Page Builder.

32. What is Web Services?

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.

33. What is the difference between SOAP and REST?

● 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?

● Enterprise WSDL: Provides a strongly typed WSDL specific to your Salesforce


organization’s schema.
● Partner WSDL: A more generic WSDL that can work with any Salesforce organization
but requires dynamic handling of data types.

35. Explain Integration Patterns.

Integration patterns in Salesforce provide best practices for integrating Salesforce with external
systems. Examples include:
● Outbound Messaging
● Apex Web Services
● Platform Events
● External Services

You might also like