Search Here

Salesforce Interview Question

 


  • What is cloud Computing?

Cloud computing is a technology that involves the delivery of computing services over the internet. Instead of owning and managing physical servers and infrastructure, users can access computing resources, such as storage, processing power, databases, software, and networking, through a cloud service provider. These resources are hosted and maintained by the provider in data centers, and users can access them on-demand via the internet.

The key characteristics of cloud computing include:

  • On-Demand Self-Service: Users can provision and manage computing resources without the need for human intervention from the service provider.

  • Broad Network Access: Cloud services are accessible over the internet from various devices, such as laptops, smartphones, and tablets.

  • Resource Pooling: The cloud provider's resources are pooled together to serve multiple customers. Resources are dynamically assigned and reassigned based on demand.

  • Rapid Elasticity: Cloud services can scale up or down quickly to meet changing demands, allowing users to access more resources during peak times and release them during low usage.

  • Measured Service: Cloud computing resources are metered, and users pay for only the resources they consume. This "pay-as-you-go" model makes it cost-effective and flexible for businesses.

Cloud computing offers several deployment models and service models:

Deployment Models:

  • Public Cloud: Services are provided over the internet and shared among multiple customers. The cloud infrastructure is owned and managed by the service provider.

  • Private Cloud: Cloud infrastructure is dedicated to a single organization and can be located on-premises or hosted by a third-party provider.

  • Hybrid Cloud: A combination of public and private clouds, allowing data and applications to be shared between them.

Service Models:

  • Infrastructure as a Service (IaaS): Provides virtualized computing resources over the internet, such as virtual machines, storage, and networking.

  • Platform as a Service (PaaS): Offers a platform and environment to develop, deploy, and manage applications without the complexity of managing underlying infrastructure.

  • Software as a Service (SaaS): Delivers software applications over the internet, eliminating the need for users to install, maintain, and manage the software on their devices.



  • What is Paas, Saas, Iaas?

n Salesforce, PaaS, SaaS, and IaaS refer to different service models that the platform offers to its users. Let's break down what each of these acronyms means in the context of Salesforce:

  • PaaS (Platform as a Service): Platform as a Service provides a cloud computing environment where users can build, deploy, and manage applications without having to worry about the underlying infrastructure. Salesforce's PaaS offering is known as "Salesforce Platform" or "Salesforce Platform as a Service."

Salesforce PaaS includes several services and tools that enable developers to create custom applications on top of the Salesforce platform. Some key components of Salesforce PaaS include:

  • Salesforce Lightning: A modern development framework that allows developers to build interactive and responsive applications using components and declarative tools.

  • Apex: A proprietary programming language for building business logic and customizing Salesforce.

  • Visualforce: A markup language used to create custom user interfaces for Salesforce applications.

  • Heroku: A cloud application platform that supports multiple programming languages, enabling developers to build and deploy applications independently of the Salesforce platform.

  • SaaS (Software as a Service): Software as a Service refers to cloud-based software applications that are hosted and managed by a third-party provider and delivered over the internet to end-users. Salesforce's flagship product, Salesforce CRM, is a prime example of a SaaS offering.

With Salesforce's SaaS model, users can access the full suite of Salesforce CRM features, including sales automation, customer support, marketing automation, analytics, and more, without the need to install and maintain any software locally. Users can access the platform through a web browser or mobile app and enjoy regular updates and enhancements delivered by Salesforce.

  • IaaS (Infrastructure as a Service): Infrastructure as a Service provides virtualized computing resources over the internet. Salesforce doesn't offer a pure IaaS model directly to customers; instead, they manage their infrastructure to support their PaaS and SaaS offerings. Salesforce's data centers and infrastructure support the underlying platform and applications, ensuring high availability, security, and scalability for their customers.


  • What is Sandbox and the Type of Sandbox in Salesforce?

In Salesforce, a sandbox is a copy of your organization's data and metadata in a separate environment. It provides a safe and isolated space for testing, development, training, and other activities without affecting the production environment. Using sandboxes helps ensure that changes or experiments are conducted without the risk of disrupting real user data and configurations.

Salesforce offers different types of sandboxes to cater to various use cases and needs. The types of sandboxes available in Salesforce are:

  • Developer Sandbox:

  • Purpose: The Developer Sandbox is primarily used for individual development and testing by developers and administrators.

  • Use Case: Developers can use this sandbox to create and test new features, code, and configurations before deploying them to production.

  • Data: Data is copied from the production environment and is a subset of the actual data.

  • Developer Pro Sandbox:

  • Purpose: The Developer Pro Sandbox is an enhanced version of the Developer Sandbox with increased storage capacity.

  • Use Case: It is suitable for individual developers or smaller development teams who require more storage space for testing and development.

  • Data: Similar to Developer Sandbox, it contains a subset of production data.

  • Partial Copy Sandbox:

  • Purpose: Partial Copy Sandbox is designed for testing and training purposes, with a more comprehensive data set than the Developer Sandboxes.

  • Use Case: This type of sandbox is often used for quality assurance and user acceptance testing, as it allows testing against more realistic data scenarios.

  • Data: Partial Copy Sandboxes include a subset of the production data but can be customized to include specific data sets based on criteria, such as date range or object selection.

  • Full Sandbox:

  • Purpose: The Full Sandbox is an exact replica of the production environment, including all data and metadata.

  • Use Case: It is used for comprehensive testing, performance testing, and as a staging environment for final validation before deployment to production.

  • Data: Full Sandboxes contain a complete copy of production data, making them the most realistic environment for testing.

  • Scratch Org (Not a traditional Sandbox):

  • Purpose: Scratch Orgs are temporary, throwaway environments specifically designed for Salesforce DX (Developer Experience) and source-driven development.

  • Use Case: Developers use Scratch Orgs for building and testing features in a completely clean environment, separate from any existing organization data.

  • Data: Scratch Orgs are typically empty, with no real data from a production environment.


  • What is Object in Salesforce?

In Salesforce, an object is a fundamental data structure that represents a specific type of data or information. Objects are used to organize and store data in a structured manner within the Salesforce platform. Essentially, objects act as database tables, and records within those objects are equivalent to rows in the table.

Salesforce provides standard objects that are predefined and commonly used for various business processes, such as accounts, contacts, opportunities, cases, leads, and more. Additionally, organizations can create custom objects to store data specific to their unique business needs.

Here are the key aspects of objects in Salesforce:

  • Standard Objects: These are pre-built objects that come with Salesforce and are part of the standard functionalities, designed to support common business processes. Examples include Account, Contact, Opportunity, Case, Lead, and many others.

  • Custom Objects: Organizations can create custom objects to store data unique to their business requirements. Custom objects can have custom fields, relationships, and functionalities tailored to the organization's needs.

  • Fields: Objects consist of fields that define the type of data that can be stored in the object. For example, a "Name" field may store text data, while a "Date of Birth" field may store date data.

  • Records: Records are instances of objects and represent individual entries within an object. For example, each contact in the "Contact" object is a record.

  • Relationships: Objects can be related to each other through relationships. For instance, an "Opportunity" object may be related to an "Account" object through a lookup relationship.

  • Object Metadata: Object metadata defines the object's properties, such as field configurations, page layouts, validation rules, and triggers.

  • Object Access: The object access determines which users or profiles have permissions to view, create, edit, or delete records in a specific object.


  • What are the different types of object relations in salesforce

In Salesforce, there are several types of object relationships that allow you to link one object with another, establishing connections between records and facilitating data access and manipulation. The different types of object relationships in Salesforce are:

  • Master-Detail Relationship:

    • The Master-Detail relationship is a tightly coupled relationship where the child record depends on the existence and visibility of the parent record.

    • When a Master-Detail relationship is established between two objects, the child object is referred to as the "detail" object, and the parent object is referred to as the "master" object.

    • When the master record is deleted, all related detail records are automatically deleted (cascade delete).

    • The security and sharing settings of the detail record are determined by the master record.

    • Roll-up summary fields can be used to perform calculations on child records and display the results on the master record.

  • Lookup Relationship:

    • The Lookup relationship is a looser relationship where the child record links to a parent record but does not depend on the existence of the parent record.

    • In a Lookup relationship, the child record contains a reference (lookup field) to the parent record.

    • Deleting the parent record does not affect the child record.

    • Each lookup field on a child record is associated with a single parent record, and it can be left blank (null) if no parent record is chosen.

  • Self-Relationship:

    • A Self-Relationship is a relationship between records of the same object.

    • For example, in a "Position" object, you could create a self-relationship to represent the hierarchical relationship between different positions (e.g., Manager and Subordinate positions).

  • External Lookup Relationship:

    • The External Lookup Relationship allows you to link a standard or custom object with an external object.

    • External objects represent data stored outside of Salesforce, and the relationship enables you to access and interact with external data seamlessly.

  • Indirect Lookup Relationship:

    • An Indirect Lookup Relationship is a special type of relationship that connects three objects indirectly.

    • It allows you to access the data from an object's parent through another related object. The relationship is defined by setting up the relationship fields on the three objects.

  • Junction Object:

    • A Junction Object is a custom object used to create a many-to-many relationship between two objects.

    • It typically contains two Master-Detail relationships, one to each of the related objects, and allows you to connect multiple records from both objects.


  • What is a Master–Detail relationship in Salesforce?

In Salesforce, a Master-Detail relationship is a type of object relationship that establishes a tightly coupled relationship between two objects. In this relationship, the child object is referred to as the "detail" object, and the parent object is referred to as the "master" object. The Master-Detail relationship is a fundamental and powerful feature in Salesforce that enables data aggregation, cascading deletes, and access controls.

Key characteristics of a Master-Detail relationship:

  • Dependency: In a Master-Detail relationship, the child record (detail) is dependent on the existence and visibility of the parent record (master). Every detail record must have a corresponding master record. If the master record is deleted, all related detail records are automatically deleted. This is called a "cascade delete" behavior.

  • Ownership and Sharing: The security and sharing settings of the detail record are determined by the master record. This means that the sharing settings of the detail record are inherited from the parent record.

  • Roll-up Summary Fields: A Master-Detail relationship allows you to create Roll-up Summary fields on the master object. These fields can perform calculations on the related detail records and display the results on the master record. Common calculations include sums, averages, maximum values, and counts of the related records.

  • Record Access: In a Master-Detail relationship, the detail record inherits the record-level access of the master record. If a user has access to the master record, they will also have access to all related detail records.

  • Field Dependencies: The child (detail) object can have field dependencies based on the values of fields in the parent (master) object. This allows you to control the available options in picklists or other fields based on the master record's field values.

  • Look and Feel: In the user interface, related lists for detail records are displayed on the master record page layout, making it easy to navigate and view related data.


  • What is a junction object in Salesforce?


In Salesforce, a junction object is a custom object that is used to create a many-to-many relationship between two objects. It acts as a bridge between the two objects and enables you to connect multiple records from both objects, establishing complex relationships.

The need for a junction object arises when you have two objects that need to relate to each other in a many-to-many relationship, but you cannot directly create a Master-Detail or Lookup relationship between them. Instead, you create a junction object, which has two Master-Detail relationships, one to each of the related objects.

Here's how a junction object works:

  • Objects Involved: Let's say you have Object A and Object B, and you want to establish a many-to-many relationship between them.

  • Junction Object Creation: To achieve this, you create a custom junction object (Object C) that contains two Master-Detail fields, one referencing Object A and the other referencing Object B.

  • Record Creation: When you create a record in the junction object (Object C), you can link it to specific records from both Object A and Object B, creating a relationship between them.

  • Many-to-Many Relationship: With the junction object in place, multiple records from Object A can be related to multiple records from Object B, and vice versa.

Common Use Cases for Junction Objects:

  • Products and Opportunities: In a sales scenario, you can use a junction object to link multiple products to multiple opportunities. This way, you can track which products are associated with which opportunities, and vice versa.

  • Students and Courses: In an education setting, a junction object can connect multiple students with multiple courses, showing which students are enrolled in which courses and vice versa.

  • Contacts and Events: A junction object can link multiple contacts to multiple events, allowing you to track which contacts are associated with which events and vice versa.


  • How many LR(lookup relationship) fields can be created in an object? 

In Salesforce, the number of Lookup Relationship (LR) fields that can be created on an object is limited. The maximum number of Lookup Relationship fields allowed on an object depends on the Salesforce edition you are using.

As of my knowledge cutoff in September 2021, the limits are as follows:

  • Enterprise Edition, Unlimited Edition, and Developer Edition: Up to 25 Lookup Relationship fields per object.

  • Professional Edition: Up to 2 Lookup Relationship fields per object.


  • What is a Roll-up Summary field

A Roll-up Summary field in Salesforce is a powerful feature that allows you to perform calculations on related records and display the results on the parent record. It is available for Master-Detail relationship fields and enables you to summarize data from child records (detail records) and present it at the level of the parent record (master record).

The Roll-up Summary field can perform various types of calculations on child records, such as:

  • Sum: Calculates the sum of a numeric field on all related child records.

  • Count: Counts the number of related child records.

  • Minimum: Displays the smallest value of a numeric field from all related child records.

  • Maximum: Displays the largest value of a numeric field from all related child records.

  • Average: Calculates the average of a numeric field from all related child records.


  • How many way to create What is a Roll-up Summary field

In Salesforce, there are two primary ways to create a Roll-up Summary field:

  • Through the User Interface (UI):

    • The most common and straightforward method to create a Roll-up Summary field is through the Salesforce user interface.

    • Here's how you can create a Roll-up Summary field using the UI:

      • Go to the Object Manager by clicking on the gear icon (Setup) and selecting "Object Manager."

      • Select the object on which you want to create the Roll-up Summary field.

      • Under "Fields & Relationships," click on "New" to create a new field.

      • Choose "Roll-up Summary" as the field type and click "Next."

      • Provide a Field Label and Description for the Roll-up Summary field.

      • Choose the Object you want to create a relationship with (child object).

      • Select the type of calculation you want to perform (Sum, Count, Min, Max, or Average) and the field you want to use for the calculation on the child object.

      • Define the Filter Criteria if you want to limit the child records included in the calculation.

      • Click "Next" and complete the field creation process.

  • Using Metadata API or Tools:

    • Alternatively, you can create a Roll-up Summary field programmatically using the Salesforce Metadata API or various Salesforce development tools like Salesforce DX or Metadata Deploy.

    • This method is useful when you need to deploy changes across multiple Salesforce orgs or as part of a version-controlled development process.


  • What is field dependency

In Salesforce, field dependency is a feature that allows you to create a relationship between two fields on an object, where the values available in one field depend on the value selected in another field. It is used to control the available options in a picklist or multi-select picklist based on the value chosen in a controlling field.

Field dependency is often employed to simplify data entry and ensure data accuracy by limiting the available options based on specific conditions or business rules. It helps prevent inconsistent data entry and guides users in selecting appropriate values.

Here's how field dependency works:

  • Controlling Field: The controlling field is the field that determines the available options in the dependent field. It is typically a picklist or a checkbox field.

  • Dependent Field: The dependent field is the field whose available options are influenced by the value selected in the controlling field. It is also usually a picklist or multi-select picklist.

  • Field Mapping: For each value in the controlling field, you define a set of corresponding values that should be available in the dependent field. These mappings establish the relationship between the two fields.

  • User Experience: When a user selects a value in the controlling field, the dependent field's available options automatically update based on the predefined mappings. Users can then choose from the limited set of options that are relevant for the selected controlling field value.

Examples of Field Dependency:

Let's consider an example of a custom object called "Opportunity Evaluation," which has two fields: "Stage" and "Reason for Closure."

  • Controlling Field: "Stage" (Picklist with values: Prospecting, Qualification, Closed Won, Closed Lost)

  • Dependent Field: "Reason for Closure" (Picklist with values: Not Applicable, Won, Lost)

In this scenario, you can set up field dependency such that when the "Stage" field is set to "Closed Won," the "Reason for Closure" field only shows the options "Not Applicable" and "Won." Conversely, if the "Stage" field is set to "Closed Lost," the "Reason for Closure" field only displays the option "Lost."


  • What is the difference between role and profile

In Salesforce, roles and profiles are both used to manage user access and permissions, but they serve different purposes and have distinct functionalities. Let's understand the difference between roles and profiles:

  • Profiles:

    • A profile is a collection of settings and permissions that determine what a user can do in Salesforce. It defines the level of access a user has to various objects, fields, and functions within the application.

    • Each user in Salesforce is assigned to a profile, which governs their overall access and abilities. Different profiles can be created to cater to various user roles and responsibilities.

    • Profile settings include object permissions (Read, Create, Edit, Delete), field-level security, user permissions (e.g., API access, modify all data), and access to tabs, applications, and record types.

    • Profiles are used to manage broad access rights for users based on their functional roles within the organization.

  • Roles:

    • A role is used to define the hierarchical structure of the organization and to determine data visibility for users in the Salesforce organization.

    • The role hierarchy represents the reporting relationships within the organization, with higher-level roles having visibility to the data owned by users in lower-level roles.

    • The role hierarchy controls data sharing, as users in higher-level roles can view, edit, and report on records owned by users in lower-level roles.

    • Roles are especially relevant in organizations that follow a vertical data-sharing model, where data visibility is controlled based on the organization's hierarchical structure.

In summary, the main difference between roles and profiles is their primary focus:

  • Profiles primarily govern what a user can do within the Salesforce application, setting permissions and access levels.

  • Roles determine data visibility and data sharing within the organization, based on the hierarchical reporting relationships.


  • What are Permission sets?

In Salesforce, permission sets are a way to grant additional permissions and access to specific users or groups beyond what their profile allows. They provide a flexible and customizable way to extend user privileges without modifying the user's profile, making them a powerful tool for managing user permissions.

Permission sets allow administrators to grant access to:

  • Object Permissions: Read, Create, Edit, Delete, View All, Modify All, etc., for specific objects.

  • Field-Level Security: Grant read and edit access to specific fields on objects.

  • System Permissions: Enable or disable specific system-level permissions, such as API access, exporting data, managing users, etc.

  • App Permissions: Control access to specific apps and tabs within the Salesforce user interface.

  • Apex Class and Visualforce Page Access: Permit access to custom code components for development or other functionalities.

Key points about Permission Sets:

  • Independent of Profiles: Permission sets are independent of profiles and can be assigned to users in addition to the permissions defined by their profile.

  • Cumulative Permissions: If a user has multiple permission sets, their permissions are cumulative, providing them with the combined access granted by all assigned permission sets.

  • Dynamic Assignments: Permission sets can be assigned and removed from users at any time without affecting their profile settings.

  • Limited by License: Permission sets are subject to licensing restrictions, so not all features and permissions may be available based on the user's Salesforce edition and license type.

  • Customization and Flexibility: Permission sets offer a high level of customization and flexibility, making them valuable for granting specific permissions to a subset of users without the need to create custom profiles.

Use Cases for Permission Sets:

  • Temporary Access: Grant temporary access to a specific feature or data for a limited time without changing the user's profile settings permanently.

  • Custom App Access: Allow certain users to access specific custom apps or tabs that are not available to their profile by default.

  • Special Permissions: Provide specific users or groups with unique permissions required for specific tasks, such as data imports, reporting, or development.


  • What is use of muting permission set in permission set group

   

In Salesforce, the "Muting" feature in Permission Set Groups allows you to exclude specific permissions from a group of users who have been assigned a combination of permission sets. When you mute a permission in a permission set group, it means that users assigned to that group won't receive the permissions included in the muted permission set.

This feature is particularly useful when you have a group of users who need a set of permissions, but there is one specific permission that you want to exclude for them without creating a separate permission set. By using the Muting option, you can achieve this without modifying individual permission sets or creating new ones.

Here's how the Muting feature works:

  • Create Permission Sets: First, you create several permission sets that contain the desired permissions for various groups of users. For example, you might have "Sales Permissions," "Marketing Permissions," and "Accounting Permissions" permission sets.

  • Create Permission Set Group: Next, you create a Permission Set Group and add the relevant permission sets to it. This way, you have a consolidated set of permissions that can be assigned to a specific group of users.

  • Mute Specific Permissions: If there is a permission that you want to exclude for the users in the Permission Set Group, you can mute that particular permission. This means that even if the users are assigned to the group with multiple permission sets, the muted permission will not be granted to them.

  • Assign Permission Set Group: Finally, you assign the Permission Set Group to the appropriate users or profiles. Users who are part of this group will receive all the permissions from the permission sets in the group, except for the muted permissions.

Use Case Example: Let's say you have a set of users who need both "Sales Permissions" and "Marketing Permissions" because they are responsible for both sales and marketing tasks. However, you want to prevent them from exporting data from Salesforce. In this case, you can mute the "Export Data" permission in the Permission Set Group that includes both "Sales Permissions" and "Marketing Permissions." By doing so, the users will have all the required permissions for their roles except for the ability to export data.

Using the Muting feature in Permission Set Groups provides a flexible and efficient way to control permissions for groups of users without creating redundant or overly specific permission sets for each user role.


  • How many ways we can share a record?

In Salesforce, there are several ways to share records with other users or groups to control access to data. The various methods for sharing records include:

  • Organization-Wide Defaults (OWDs):

    • OWDs determine the default level of access that all users have to records of a specific object in the organization. The OWD settings include:

      • Private: Only the record owner has access.

      • Public Read Only: All users can view records but cannot edit or delete them.

      • Public Read/Write: All users can view, edit, and delete records.

  • Role Hierarchy:

    • The role hierarchy defines the reporting structure within the organization. It affects data visibility, as users higher in the hierarchy can access and edit records owned by users lower in the hierarchy.

    • Users can access records owned by or shared with users below them in the role hierarchy.

  • Sharing Rules:

    • Sharing rules are used to automatically extend sharing access to records based on defined criteria. They can be created to grant access to specific groups of users based on field values or ownership.

    • Sharing rules can only be used for certain objects and can grant Read-Only or Read/Write access.

  • Manual Sharing:

    • Manual sharing allows record owners or users with the "Modify All Data" permission to share individual records with other users or groups.

    • Users can manually share records on an ad-hoc basis to grant additional access to specific users or groups.

  • Apex Managed Sharing:

    • Apex Managed Sharing enables developers to programmatically control sharing access to records using Apex code.

    • With Apex Managed Sharing, you can create custom sharing rules and define sharing behavior based on specific business logic or criteria.

  • Sharing Sets:

    • Sharing Sets are used to grant access to specific records within an object to a group of users.

    • They are often used in Communities to provide record-level access to community members.

  • Account Teams and Opportunity Teams:

    • Account Teams and Opportunity Teams allow users to share records related to an Account or Opportunity with other team members, providing visibility and collaboration on key records.


  • What are Audit Fields in Salesforce?

In Salesforce, Audit Fields refer to a set of standard system fields that automatically track important information about records. These fields capture metadata and historical data changes, providing a valuable audit trail for administrators and users to monitor record modifications, creation, and deletion. The primary audit fields in Salesforce include:

  • Created Date (CreatedDate):

    • The Created Date field records the date and time when a record is first created in Salesforce. It provides the timestamp of when the record was initially added to the database.

  • Created By (CreatedBy):

    • The Created By field stores the user who created the record. It captures the User ID of the person responsible for creating the record.

  • Last Modified Date (LastModifiedDate):

    • The Last Modified Date field tracks the date and time when a record was last modified or updated. It gets updated whenever any field on the record is changed.

  • Last Modified By (LastModifiedBy):

    • The Last Modified By field records the user who last modified the record. It captures the User ID of the person responsible for the most recent update to the record.

  • SystemModstamp (SystemModstamp):

    • The SystemModstamp field captures the date and time when a record was last modified at the system level. It includes changes made to the record that don't involve user interaction, such as changes due to automation or integration processes.


  • What is an Audit trail?

In Salesforce, an Audit Trail refers to a chronological record or log that captures a detailed history of user activities and changes made to records within the organization. It provides a comprehensive and secure audit trail of user interactions and data modifications, offering valuable insights into who did what, and when, in the Salesforce system.

The Audit Trail is particularly important for organizations for the following reasons:

  • Compliance and Security: The Audit Trail helps organizations comply with various regulatory requirements and data security standards. It serves as a tamper-proof record of all user actions and data changes, providing evidence of data governance and accountability.

  • Data Integrity: By tracking user activities and changes, the Audit Trail ensures data integrity and helps identify any unauthorized or suspicious activities that may compromise the quality and security of data.

  • Troubleshooting and Diagnostics: In case of any issues or errors, the Audit Trail is an essential tool for administrators and support teams to investigate problems and understand the sequence of events leading to the issue.

The Salesforce Audit Trail consists of two main components:

  • Setup Audit Trail:

    • The Setup Audit Trail captures administrative changes made within the Salesforce organization, such as changes to security settings, user management, workflow rules, validation rules, data sharing rules, and more.

    • It helps administrators track changes that affect the overall configuration and setup of the Salesforce system.

  • Field History Tracking:

    • Field History Tracking allows organizations to track changes to specific fields on records, such as changes to account names, opportunity amounts, contact addresses, etc.

    • When Field History Tracking is enabled for a field, Salesforce automatically creates "Field History" records for each change, showing the previous and new values of the field along with the user who made the change and the timestamp of the change.


  • What is a Queue in Salesforce?

In Salesforce, a Queue is a powerful feature that enables organizations to efficiently manage and distribute work items, such as records, tasks, and cases, among a group of users. It acts as a container for holding records that are waiting to be assigned or worked on by members of the group. Queues are commonly used to facilitate collaborative and distributed workflows, ensuring that work items are addressed by the appropriate team members in a timely manner.

Key features and characteristics of queues in Salesforce:

  • Record Ownership: Unlike individual users who directly own records, records in a queue have shared ownership among the queue members. When a record is placed in a queue, it becomes available for members of the queue to work on.

  • Assignment and Ownership: When a record is taken from the queue by a user, the ownership of the record is temporarily assigned to that user. The record is then removed from the queue until it is returned or assigned to another user.

  • Assignment Rules: Assignment rules can be configured to automatically assign records to specific queues based on predefined criteria. For example, incoming cases can be automatically routed to different queues based on their origin or type.

  • Group Collaboration: Queues facilitate collaboration among team members, ensuring that work items are distributed evenly and addressed by the appropriate individuals based on their expertise or availability.

  • Visibility and Access: Queue members can view and work on records in the queue, but they do not need to be the record's owner. Access to records in a queue is controlled by record-level security settings and sharing rules.

Common use cases for queues in Salesforce include:

  • Case Management: Queues are often used in customer service scenarios to manage and distribute support cases among support agents or teams.

  • Lead Management: Queues can be used to manage incoming leads and distribute them to sales representatives based on specific criteria.

  • Task Assignment: In project management, queues can be utilized to assign tasks to team members based on their expertise or workload.

  • Record Routing: Queues can be employed to automatically route records, such as leads or cases, to the appropriate teams or individuals based on specific conditions or criteria.


  • What is a Public Group

In Salesforce, a Public Group is a collection of users, roles, or other public groups that are grouped together for ease of sharing and collaboration. Public Groups provide a convenient way to grant access to records, share reports and dashboards, and assign ownership of records to multiple users or roles simultaneously.

Key features and characteristics of Public Groups in Salesforce:

  • Collaboration and Sharing: Public Groups are primarily used for collaboration purposes, as they allow multiple users or roles to access and work on records, reports, dashboards, and other shared resources.

  • Membership: A Public Group consists of a set of individual users, roles, or other public groups as its members. Users or roles can be added to a Public Group manually or based on criteria defined in rules.

  • Record Sharing: Public Groups can be used to share records (e.g., accounts, opportunities, cases) with multiple users or roles at once. This is particularly useful when you want to grant access to a set of records to a specific team or department.

  • Report and Dashboard Sharing: Public Groups can be used to share reports and dashboards with a group of users or roles, allowing them to view and collaborate on the same data and insights.

  • Ownership Assignment: In Salesforce, records can be owned by individual users or by a group (e.g., a Public Group). By assigning ownership to a Public Group, multiple users within the group can work on the same set of records.

  • Public Group Types: Salesforce provides three types of Public Groups:

    • Regular Public Groups: A manually created group of users, roles, or other public groups.

    • Queue: A special type of public group used for case assignment and collaboration.

    • Dynamic Public Groups: These groups are based on rules and automatically include members based on specific criteria.

Common use cases for Public Groups in Salesforce include:

  • Sharing records with multiple users or teams to enable collaborative work.

  • Granting access to reports and dashboards to a defined set of users or roles.

  • Using queues (a type of public group) to manage case assignment and ownership.


  • Difference between static and dynamic dashboards in Salesforce?

In Salesforce, the terms "static dashboard" and "dynamic dashboard" refer to different ways of presenting and displaying data on a dashboard. The main difference between the two lies in how the data is updated and refreshed on the dashboard.

  • Static Dashboard:

    • A static dashboard is a dashboard that contains fixed or static components, meaning the data displayed on the dashboard does not change unless manually refreshed or edited by the user or administrator.

    • The data on a static dashboard is typically based on a snapshot of information taken at a specific point in time, and it remains the same until it is modified or updated.

    • Any changes to the underlying data in Salesforce do not automatically reflect on a static dashboard unless the dashboard is manually refreshed or modified to include the updated data.

  • Dynamic Dashboard:

    • A dynamic dashboard is a dashboard that automatically updates and refreshes itself to display real-time or near-real-time data from the underlying reports or data sources.

    • The data on a dynamic dashboard is dynamic, meaning it reflects the most current information available in Salesforce without requiring any manual intervention.

    • Dynamic dashboards are powered by live connections to the underlying reports, which means that any changes to the data in Salesforce are immediately reflected on the dynamic dashboard.

Key characteristics of static and dynamic dashboards:

  • Static dashboards are suitable when you need to present a fixed view of data at a specific point in time. They are useful for sharing data snapshots or creating reports for historical data analysis.

  • Dynamic dashboards are more appropriate when you want to monitor real-time data and stay up-to-date with the latest information. They are commonly used for tracking live performance metrics, sales data, or operational KPIs.


  • What are the different types of reports available in Salesforce?

In Salesforce, there are several types of reports available to help users analyze and visualize data. Each report type is designed to cater to different use cases and present data in various formats. The main types of reports in Salesforce are:

  • Tabular Reports:

    • Tabular reports are the simplest and most basic type of report. They display data in a simple table format, where rows represent records and columns represent fields or data categories.

    • Tabular reports are useful for displaying raw data, and they can be easily customized to show specific fields and sort the data as needed.

  • Summary Reports:

    • Summary reports provide grouped data with subtotals. They organize data into groups based on specified grouping criteria and display subtotals for each group.

    • Summary reports are helpful for data analysis, allowing users to understand data patterns and trends within different categories.

  • Matrix Reports:

    • Matrix reports present data in a cross-tabular format, with both row and column groupings. They allow users to compare data across two dimensions.

    • Matrix reports are ideal for analyzing data that involves multiple variables and creating a summary view of data intersections.

  • Joined Reports:

    • Joined reports combine data from multiple report blocks, each with its set of fields and filters. It allows users to view data from different report types in a single report.

    • Joined reports are useful when you need to compare data from unrelated objects or include data from various sources in one report.

  • Historical Trend Reports:

    • Historical trend reports show trends in data over a specific time period using historical snapshots.

    • They are used in conjunction with the Historical Trend feature to track changes to specific fields over time.

  • Lightning Table, Donut, and Horizontal Bar Charts:

    • These are types of reports that visualize data in the form of tables, donut charts, or horizontal bar charts.

    • Lightning Table, Donut, and Horizontal Bar Charts are part of the Salesforce Lightning Experience and provide interactive and visually appealing data representations.

  • Custom Report Types:

    • Custom report types allow users to create reports that include fields from multiple related objects.

    • They provide a way to create specialized reports tailored to specific business needs and data relationships.

Salesforce also offers advanced reporting features, such as bucket fields, cross filters, report formulas, and joined reports, which allow for even more complex and customized data analysis and presentation.


  • What is Report Type?

In Salesforce, a Report Type is a template or blueprint that defines which objects and fields can be used in a report. It determines the data that can be included in a report and the relationships between the objects that can be utilized in the report.

When creating a report, you must choose a specific Report Type that aligns with the data you want to analyze. Each Report Type defines the primary object from which the report data originates and may include related objects connected through lookup or master-detail relationships.

Key points about Report Types in Salesforce:

  • Primary Object: A Report Type has a primary or main object from which the report data is retrieved. This primary object acts as the foundation for the report, and all the other objects included in the report are related to this main object.

  • Related Objects: In addition to the primary object, a Report Type can include related objects connected through lookup or master-detail relationships. These related objects allow you to access data from multiple objects in a single report.

  • Access to Fields: The Report Type defines which fields from the included objects are available for use in the report. Only fields that are accessible in the selected Report Type can be added to the report.

  • Scope of Data: The Report Type determines the scope of data available for reporting. For example, it can define whether all records, records owned by the user, or records shared with the user are available in the report.

  • Custom Report Types: Salesforce allows the creation of Custom Report Types, which enable users to create specialized reports that include fields from multiple related objects.

Common use cases for Report Types:

  • Opportunity Reports: To analyze data related to opportunities, including associated accounts, contacts, and other custom objects.

  • Case Reports: To track and analyze customer support cases, along with information from related objects like accounts, contacts, and products.

  • Account Reports: To generate reports about accounts and their related contacts, opportunities, and other related objects.

  • Custom Business Reports: Custom Report Types can be created to suit specific business requirements, allowing users to analyze data from multiple custom and standard objects in one report.


  • What are WhoId and WhatId in activities?

In Salesforce, WhoId and WhatId are standard fields used in activities to identify the people (WhoId) and related records (WhatId) associated with the activity. Activities include tasks and events, such as calls, meetings, emails, and other interactions tracked in Salesforce.

  • WhoId:

    • The WhoId field is used to identify the "Who" or the individual or group of individuals associated with the activity.

    • The WhoId can refer to different types of records in Salesforce, including:

      • Lead (Record ID of a lead object)

      • Contact (Record ID of a contact object)

      • User (Record ID of a user object)

      • Group (Record ID of a group object)

    • Depending on the type of activity and its purpose, the WhoId is populated with the appropriate record ID to represent the individual or group involved.

  • WhatId:

    • The WhatId field is used to identify the "What" or the record related to the activity. It represents the object with which the activity is associated.

    • The WhatId can refer to various types of records in Salesforce, such as:

      • Account (Record ID of an account object)

      • Opportunity (Record ID of an opportunity object)

      • Custom Object (Record ID of a custom object)

    • The WhatId is used to link the activity to a specific record or object in Salesforce.

By using the WhoId and WhatId fields in activities, Salesforce can effectively track and relate interactions between individuals, groups, and records within the organization. For example:

  • A completed task related to a specific contact (WhoId) might be linked to a related opportunity (WhatId) to show the task's relevance to a particular sales opportunity.

  • An event with multiple attendees (WhoId) might be associated with an account (WhatId) to record the interaction with the account's representatives.


  • What is a bucket field in reports?

In Salesforce, a "Bucket Field" is a custom field that allows you to categorize and group data in a report based on specified criteria. It provides a way to group or divide data into ranges, intervals, or specific categories, making it easier to analyze and visualize the data in a more meaningful way.

When you create a Bucket Field in a report, you define various groupings or "buckets" for the data based on certain conditions or criteria. These conditions are usually based on the values of an existing field in the report. For example, you could create a Bucket Field to group opportunities by their amounts into categories like "Low Value," "Medium Value," and "High Value."

Here's how to create a Bucket Field in a Salesforce report:

  • Go to the report you want to work with.

  • Click the "Edit" button to modify the report.

  • Find the field you want to use as the basis for your Bucket Field.

  • Click on the dropdown arrow next to the field name and select "Create Bucket Field."

  • Define the buckets by specifying the range of values, individual values, or conditions to include in each bucket.

  • Give your Bucket Field a name and optional description.

  • Save the Bucket Field.

Once the Bucket Field is created, it will appear as a new column in your report, allowing you to view and group the data based on the defined buckets. This can be helpful for segmentation, summarizing data, and gaining insights from the report in a more organized manner.


  • Way to clean data in Salesforce

Cleaning data in Salesforce is essential to maintain data accuracy and integrity. Here are some common ways to clean data in Salesforce:

  • Data Validation Rules: Use validation rules to enforce data quality at the point of data entry. You can define rules that check for specific conditions, formats, or ranges for fields, ensuring that only valid data is entered.

  • Field-Level Security: Restrict access to certain fields to prevent unauthorized changes and ensure that only users with appropriate permissions can modify critical data.

  • Duplicate Management: Salesforce provides duplicate management tools to identify and merge duplicate records. Configure matching rules and duplicate rules to prevent the creation of duplicate records and merge existing duplicates.

  • Data Loader: Use the Data Loader tool to import and update data in bulk. Before importing data, ensure it is clean and properly formatted in the CSV file to avoid creating duplicate or incorrect records.

  • Mass Update and Mass Delete: Salesforce allows you to perform mass updates and deletions on records based on specific criteria. This can be helpful for cleaning up outdated or incorrect data.

  • Data Cleansing Tools: Consider using third-party data cleansing tools or Salesforce AppExchange apps that can help identify and correct data quality issues automatically.

  • Regular Data Audits: Conduct periodic data audits to identify and rectify data inconsistencies, missing information, or outdated records.

  • Training and Data Governance: Provide proper training to users on data entry best practices and establish data governance policies to ensure data quality is maintained consistently.

  • Workflow Rules and Process Builder: Implement automation using workflow rules or the Process Builder to enforce certain data updates or standardize data based on predefined criteria.

  • Reports and Dashboards: Use reports and dashboards to monitor data quality and identify areas that require cleaning or improvement.


  • Differences between Import wizard and Data loader

Salesforce provides two main tools for importing and exporting data: the Import Wizard and Data Loader. While both tools serve the purpose of data management, they have some key differences in terms of functionality and use cases:

  • User Interface vs. Command Line:

    • Import Wizard: The Import Wizard is a user-friendly tool with a graphical interface that guides users through the data import process step by step. It is designed for non-technical users and provides a simple way to import data without the need for coding or advanced technical knowledge.

    • Data Loader: Data Loader is a command-line interface (CLI) or desktop application that requires some technical expertise to operate effectively. It is better suited for experienced users or administrators who are comfortable working with CSV files and using the command line or GUI interface.

  • Data Volume:

    • Import Wizard: The Import Wizard is suitable for importing small to medium-sized datasets (up to 50,000 records) at a time. It is not optimized for handling large volumes of data efficiently.

    • Data Loader: Data Loader is designed to handle large volumes of data and can efficiently import and export millions of records. It is the recommended tool for handling massive data operations.

  • API Calls:

    • Import Wizard: The Import Wizard uses the Salesforce API to perform data imports. Each record imported consumes one API call, which means you might quickly reach your API limits when importing large datasets.

    • Data Loader: Data Loader also utilizes the Salesforce API for data operations. However, it provides the option to use bulk API, which can significantly reduce the number of API calls required for importing or exporting large datasets.

  • Upsert Operations:

    • Import Wizard: The Import Wizard supports only the "insert" operation for new records. If a record with the same unique identifier (like an external ID) already exists, it won't update the existing record.

    • Data Loader: Data Loader supports both "insert" and "update" (upsert) operations. It can insert new records and update existing records based on specified match criteria, making it more versatile for data synchronization.

  • Schedule and Automation:

    • Import Wizard: The Import Wizard is primarily intended for manual data imports and does not offer scheduling or automation features.

    • Data Loader: Data Loader can be used in automated processes or scheduled to run at specific intervals, making it suitable for recurring data loads or integrations.


  • What is “Data Skew” in Salesforce

In Salesforce, "Data Skew" refers to an uneven distribution of data records within a specific field or object. It typically occurs when a large number of child records are related to a single parent record, causing an imbalance in data distribution and potentially leading to performance issues.

Data skew can occur in scenarios where many child records, such as activities, cases, or custom objects, are associated with a single parent record, like an account, opportunity, or custom parent object. This high concentration of child records related to one parent can impact database performance, query execution times, and governor limits.

Data skew can lead to several issues, including:

  • Performance Bottlenecks: Accessing or querying the parent record with a large number of related child records can result in slow performance and increased processing times.

  • Lock Contention: Data skew can lead to lock contention, where multiple users or processes attempt to access or update the same parent record simultaneously, causing contention and potential locking issues.

  • Recalculation Delays: Recalculating roll-up summary fields or formula fields based on the related child records can be slower and result in delays when dealing with data skew.

  • Governor Limit Hits: Salesforce has various governor limits to control resource usage. Data skew can cause these limits to be reached more quickly, leading to errors or disruptions in functionality.

To mitigate data skew, Salesforce administrators can consider the following strategies:

  • Record Ownership: Distribute record ownership more evenly across users or teams to distribute the child records more evenly.

  • Data Archiving: Archive or remove outdated or less frequently accessed child records to reduce the concentration of data related to a single parent record.

  • Parent Record Splitting: If possible, divide large parent records into smaller ones, spreading the child records across multiple parent records.

  • Async Processes: Consider using asynchronous processes like Apex Batch or Queueable jobs to handle data operations on large datasets without affecting the immediate user experience.

  • Declarative Solutions: Use declarative features like workflow rules, process builder, and flow to automate processes and reduce the need for trigger-based automation that might cause skew.


  • What is cascade deletion?

Cascade deletion, also known as "cascading delete," is a feature in Salesforce that allows you to automatically delete related child records when their parent record is deleted. This feature helps maintain data integrity by ensuring that child records are not left orphaned or associated with a parent record that no longer exists.


Cascade deletion is particularly useful when you have a parent-child relationship between objects. For example:


Standard Parent-Child Relationship: In Salesforce, objects like Account (parent) and Contact (child) have a standard parent-child relationship. When you delete an Account, you can choose to automatically delete all associated Contacts using cascade deletion.


Custom Parent-Child Relationship: If you create a custom object and establish a lookup or master-detail relationship to another object, you can configure cascade deletion to automatically remove child records when the parent record is deleted.


Here's how cascade deletion works in Salesforce:


Configuring Cascade Deletion: When you set up a lookup or master-detail relationship between two objects, you have the option to enable cascade deletion on the relationship. This means that when the parent record is deleted, all related child records are also deleted.


Deleting the Parent Record: When you delete the parent record, Salesforce automatically identifies all related child records based on the defined relationship and removes them from the database.


Delete Triggers and Validation Rules: During cascade deletion, Salesforce triggers and validation rules for the child object are still executed, just as if you were deleting the child records directly.


Parent Record Restoration: If you restore a deleted parent record from the recycle bin, the associated child records are also restored, ensuring data consistency.


  • What is a Flow?

In Salesforce, a "Flow" is a declarative tool that allows users to automate business processes by creating guided, interactive sequences of screens and actions. Flows can be used to automate complex processes, gather information from users, update or create records, and perform various business logic without the need for custom code.

Flows are built using a drag-and-drop interface, making them accessible to administrators or non-developers to design and implement. They are part of Salesforce's low-code development approach, enabling users to create sophisticated automation and workflows without writing Apex code.

Key components of a Flow include:

  • Screens: Screens represent the user interface of the flow. They allow users to input data, make selections, or view information during the flow's execution. Screens can include various types of fields, such as text fields, picklists, radio buttons, and checkboxes.

  • Elements: Elements are the building blocks of a Flow and represent individual actions or operations. Examples of elements include record updates, record creations, decision elements, loops, and subflows.

  • Variables: Variables store and manipulate data within a Flow. They can store user input, record data, or results of calculations.

  • Logic and Decision Making: Flows support decision elements, allowing users to create branching logic based on conditions, such as if-else statements.

  • Resources: Resources in a Flow can include images, text templates, or reusable subflows that help organize and simplify flow design.

  • Integration: Flows can integrate with external systems or call Apex classes to perform more complex operations if needed.

Flows can be triggered in various ways, such as:

  • From a custom button or link on a record detail page.

  • As part of a process automation, like process builder or workflow rules.

  • By embedding a Flow in a Lightning page or community.

  • Through API or Apex triggers.

Salesforce provides two types of Flows:

  • Screen Flows: Screen Flows are used to collect information from users through a series of screens and can be used for tasks like data entry, creating records, or updating records.

  • Autolaunched Flows: Autolaunched Flows do not require user interaction and can be used for automation purposes. They can be initiated by a trigger, process, or called from another Flow.


  • Types of flows in Salesforce

In Salesforce, there are several types of Flows that you can create and use to automate different business processes. Each type of Flow serves specific purposes and is designed for particular use cases. Here are the main types of Flows in Salesforce:

  • Screen Flows:

    • Purpose: Screen Flows are interactive and user-guided flows that allow users to input data and make decisions through a series of screens.

    • Use Cases: Screen Flows are commonly used for data entry, data updates, record creation, and collecting information from users in a guided manner.

  • Autolaunched Flows:

    • Purpose: Autolaunched Flows do not require user interaction and are designed for automation purposes.

    • Use Cases: Autolaunched Flows are used for automating background processes, data manipulation, integration with external systems, and complex business logic that doesn't require user input.

  • Record-Triggered Flows:

    • Purpose: Record-Triggered Flows are triggered automatically when records are created or updated based on specific criteria.

    • Use Cases: These Flows are used for automating processes that are dependent on changes to record data, such as updating related records, sending emails, or performing calculations.

  • Scheduled Flows:

    • Purpose: Scheduled Flows are flows that you can schedule to run at specific times or intervals.

    • Use Cases: They are useful for automating processes that need to be executed on a regular basis, such as data cleanup, maintenance tasks, or updating records on a specific schedule.

  • Lightning Flow (Previously known as Cloud Flow Designer):

    • Purpose: Lightning Flow is an advanced version of the Flow tool that provides enhanced capabilities and features for creating complex and feature-rich Flows.

    • Use Cases: Lightning Flows are used for building more sophisticated automation, multi-screen experiences, conditional logic, and integration with external systems.


  • Name a few global variables which are used in formula and validation rules.

In Salesforce, global variables are special variables that can be used in formulas and validation rules to access context-specific information. These variables provide useful data related to the current record, user, and environment. Here are a few commonly used global variables in Salesforce formulas and validation rules:

  • $Profile: Represents the user's profile. You can use this global variable to check the profile of the user performing the action and apply specific logic based on their profile.

  • $UserRole: Represents the user's role. You can use this global variable to check the role of the user performing the action and apply specific logic based on their role.

  • $User: Represents the current user. You can use this global variable to access information about the current user, such as their name, email, ID, etc.

  • $Organization: Represents information about the organization or company. You can use this global variable to access information such as the organization's name, address, and phone number.

  • $Label: Represents custom labels defined in Salesforce. You can use this global variable to retrieve the value of a custom label and use it in formulas and validation rules.

  • $Record: Represents the current record being processed. You can use this global variable to access fields and values of the current record.

  • $RecordType: Represents the record type of the current record. You can use this global variable to check the record type and apply specific logic based on the record type.

  • $Setup: Represents information about the organization's setup, including custom settings. You can use this global variable to access custom settings and their values.

  • $Api: Represents the Salesforce API version in use. You can use this global variable to ensure your formulas and validation rules are compatible with the current API version.


  • Is there any special permission available to edit read only fields. Please explain

In Salesforce, there is a special permission called "Edit Read-Only Fields" that allows users to modify fields that are marked as read-only on the page layout. This permission can be particularly useful in scenarios where you need to temporarily override the read-only status of specific fields for certain users or profiles.

Here's how the "Edit Read-Only Fields" permission works:

  • Page Layout Read-Only Fields: In Salesforce, administrators can configure page layouts for different profiles, and they have the option to set certain fields as "read-only" on the layout. When a field is marked as read-only, users assigned to that profile cannot directly edit the field's value on the record detail page.

  • "Edit Read-Only Fields" Permission: The "Edit Read-Only Fields" permission is a user permission that can be assigned to profiles. When this permission is enabled for a specific profile, users with that profile gain the ability to edit fields marked as read-only on the page layout.

  • Temporary Override: The "Edit Read-Only Fields" permission provides a temporary override to the read-only status of fields. Users with this permission can modify read-only fields on the record detail page as long as they have edit access to the record as a whole.

  • Considerations: It's essential to use the "Edit Read-Only Fields" permission judiciously. Granting this permission can result in users making unintended changes to data, so it should only be assigned to users or profiles with a genuine need to edit read-only fields in specific situations.

To enable or disable the "Edit Read-Only Fields" permission for a profile, you'll need to:

  • Go to Setup in Salesforce.

  • Navigate to "Profiles" under the "Users" section.

  • Select the profile you want to modify.

  • Scroll down to the "System Permissions" section.

  • Find the "Edit Read-Only Fields" permission and check/uncheck the box to enable/disable it.

  • Save the changes to the profile.


  • What are the differences between Object-specific action and global actions?

In Salesforce, Object-Specific Actions and Global Actions are two types of quick actions that allow users to perform specific tasks or create records with fewer clicks. They are both part of the Lightning Experience user interface and can be added to the Salesforce page layout for quick access. However, they have some key differences in their scope and usage:

  • Object-Specific Actions:

    • Scope: Object-specific actions are associated with a specific object, such as an Account, Contact, Opportunity, or a custom object. They are available only on the record detail pages of that particular object.

    • Use Cases: Object-specific actions are designed for actions that are related to the specific object, like creating a related record (e.g., creating a new contact from an account), updating specific fields on the record, or performing object-specific tasks.

  • Global Actions:

    • Scope: Global actions are not tied to any specific object and can be accessed from anywhere in Salesforce, including home pages, record pages, and the Salesforce app launcher. They are available across all objects and are not limited to a particular record type.

    • Use Cases: Global actions are typically used for common tasks that are not object-specific, such as creating a new task, logging a call, or creating a note. They are useful for actions that are frequently performed by users and need to be easily accessible from various parts of Salesforce.

  • Placement on Page Layouts:

    • Object-Specific Actions: These actions are added to the Salesforce page layout for a specific object and appear in the "Actions" section of the record detail page.

    • Global Actions: Global actions are added to the Salesforce page layout separately from the object-specific actions and appear in the "Global Actions" section of the Lightning page layout.

  • Context and Predefined Values:

    • Object-Specific Actions: Object-specific actions inherit context from the parent record. For example, if you create an object-specific action to create a related opportunity from an account, the account ID will be prepopulated in the new opportunity record.

    • Global Actions: Global actions do not inherit context from any specific record. When creating a global action, you can define predefined values for fields, but they are not automatically linked to a particular record.


  • Mention one impact point to check before deleting a role from the org.

One impact point to check before deleting a role from the org in Salesforce is to review the role hierarchy and ensure that all users under the role being deleted have an appropriate replacement role assigned.

When you delete a role from the organization, all users who were directly or indirectly reporting to that role will be affected. If those users are not assigned to a new role, it could lead to data access issues and loss of visibility for those users. Here's what you should check before deleting a role:

  • Review Role Hierarchy: Ensure that you review the entire role hierarchy to identify the users who are reporting to the role you plan to delete. This includes direct and indirect reports.

  • Reassign Users: For each user under the role you intend to delete, make sure to assign them to an appropriate replacement role in the hierarchy. This new role should have the necessary data access and visibility for the users.

  • Profile and Sharing Settings: Verify that the new role assigned to the users has the appropriate profile and sharing settings to grant the required access to records and data.

  • Approval Processes and Workflow Rules: Check if there are any approval processes or workflow rules that rely on the role being deleted. Ensure that you update those processes to use the new role if needed.

  • Custom Settings and Custom Code: Review any custom settings or custom code that references the role being deleted. Update them to accommodate the changes, if required.

  • Reporting and Dashboards: If you have any reports or dashboards based on the role being deleted, update them to reflect the changes in the role hierarchy.

  • User Training and Communication: Communicate the changes to the affected users and provide any necessary training or guidance on the new role assignments.


  • Let’s say I create two accounts a1 and a2. Now I make a2 as the parent of a1. Now what will happen if I try to make a1 parent of a2

In Salesforce, it is not possible to create a circular parent-child relationship between records. A circular relationship would occur if you try to set "a1" as the parent of "a2" when "a2" is already set as the parent of "a1". The system prevents such circular references to maintain data integrity and prevent potential data inconsistencies.

When you try to create a circular relationship between "a1" and "a2," Salesforce will display an error message preventing you from saving the record. The error message will indicate that a circular reference is not allowed and will prompt you to correct the relationship.

To establish a valid parent-child relationship between records in Salesforce, you need to ensure that the relationship forms a hierarchical tree-like structure without any circular references. For example, you can have "a1" as the parent of "a2" without any issue, but you cannot have "a2" as the parent of "a1" in the same hierarchy.


  • How do you pass the current record id to a screen flow? Also is it possible to send the entire record?

In Salesforce, you can pass the current record ID to a screen flow using a variable or a parameter. Additionally, you can send the entire record to a flow and access its fields within the flow using variables. Let's explore how to achieve both scenarios:

  • Passing the Current Record ID to a Screen Flow:

Step 1: Create a Screen Flow:

  • Start by creating a new screen flow or edit an existing one from the Flow Builder.

Step 2: Add a Variable:

  • In the flow, add a variable of type "Text" or "Record ID." This variable will store the current record ID.

Step 3: Set the Variable Value:

  • To set the value of the variable to the current record ID, add a "Get Records" element to the flow.

  • Configure the "Get Records" element to retrieve the specific record you want to process. Use the "Record ID" from the flow's Start element as the input for the record ID field in the "Get Records" element.

  • Assign the record ID from the "Get Records" element to the variable you created.

Step 4: Use the Variable:

  • You can now use the variable containing the current record ID in other elements of the flow, such as record updates, decisions, or record creations.

  • Sending the Entire Record to a Flow:

Step 1: Create a Flow with Record Input:

  • Start by creating a new flow or editing an existing one from the Flow Builder.

  • Add a "Record" variable to the flow with the type set to the object of the records you want to pass.

Step 2: Call the Flow with Record Input:

  • To send the entire record to the flow, you can call the flow using a Flow Action, Process Builder, or Apex code.

  • In the Flow Action, Process Builder, or Apex code, pass the current record as an input to the "Record" variable you defined in the flow.

Step 3: Access Record Fields in the Flow:

  • Once the flow receives the record as input, you can access its fields using the "Record" variable in elements like assignments, decisions, or record updates.


  • How do you check your org is in which release

To check the release version of your Salesforce org, you can follow these steps:

  • Log in to your Salesforce org with your credentials.

  • Click on your profile picture or initials in the top-right corner of the page.

  • From the drop-down menu, select "Switch to Salesforce Classic" (if you are using Lightning Experience).

  • In Salesforce Classic, look for the "Setup" link in the top-right corner of the page and click on it.

  • In the Setup menu, navigate to "Company Settings" under the "Administer" section on the left-hand side.

  • Click on "Company Information."

  • On the "Company Information" page, look for the "Organization Edition" and "Organization Edition (locale)" sections.

  • In the "Organization Edition" section, you will see the name of your Salesforce edition, such as "Enterprise Edition," "Professional Edition," "Developer Edition," etc.

  • In the "Organization Edition (locale)" section, you will find the "Release" information, which indicates the specific release version your org is on. For example, it might show "Winter '22," "Spring '23," etc.


  • What is a big object? Give an example of a standard big object

In Salesforce, a "Big Object" is a type of custom object designed to handle and store large volumes of data, typically in billions of records. Unlike traditional custom objects, which are stored in a Salesforce database, Big Objects are stored in a separate, scalable, and high-performance storage architecture called "BigObject Storage." This design allows for efficient data processing and analysis, making Big Objects suitable for scenarios with massive data sets.

Big Objects have some specific characteristics:

  • Data Volume: Big Objects are ideal for storing historical or infrequently accessed data, as they can accommodate billions of records without compromising performance.

  • Asynchronous Data Processing: Data operations on Big Objects are typically asynchronous, meaning that data is processed in the background. This ensures that real-time performance is not affected.

  • No Triggers or Workflows: Big Objects do not support triggers, workflows, or other real-time automation, making them best suited for use cases where real-time automation is not necessary.

  • No Relationship Queries: Big Objects do not support relationship queries with other Salesforce objects. They are mostly used for independent, standalone data storage.

  • Data Privacy and Security: Big Objects are subject to the same Salesforce security and data privacy controls, ensuring the data is protected.

Example of a Standard Big Object in Salesforce: One example of a standard Big Object in Salesforce is the "Event" object. The standard "Event" object stores past and future events, such as calendar appointments, meetings, and tasks. In cases where organizations have a large number of events and want to retain historical data without impacting performance, they can leverage the standard "Event" object as a Big Object.


  • Is it possible to use formula field in roll up summary calculation which is referring to another object?

In Salesforce, it is not possible to directly use a formula field from another object in a Roll-Up Summary (RS) field calculation. Roll-Up Summary fields are limited to performing calculations on child records related to a specific parent record.

Roll-Up Summary fields can only perform simple calculations like Sum, Count, Min, Max, and Average on a single child object related to a parent object through a Master-Detail relationship. The RS field's calculation is performed solely on the records related to the parent and does not consider fields from other objects.

If you need to include data from another object in a Roll-Up Summary calculation, you have a few alternatives:

  • Create a Formula Field on the Child Object: If the data you need for the RS calculation is available on the child object, you can create a formula field on the child object to calculate the desired value. Then, use the RS field to roll up this formula field's values.

  • Consider Declarative Roll-Up Summary Tools: There are third-party AppExchange tools available that allow for more complex Roll-Up Summary calculations, including ones that can roll up data from multiple related objects.

  • Use Trigger or Apex Code: If the required calculation is complex and cannot be achieved through a formula or RS field, you can create a trigger or use Apex code to perform the calculation and update the Roll-Up Summary field accordingly.


  • Suppose there is a custom field which has a default value but not added to the page layout. Now, if you clone a record from the UI, what would be the value of the field in the new record?

If a custom field has a default value but is not added to the page layout, and you clone a record from the user interface (UI) in Salesforce, the new cloned record will have the default value for that field.

When you clone a record, Salesforce creates a new record with the same field values as the original record, including the default values for any fields that are not explicitly set on the page layout. The new cloned record will inherit the default value of the custom field, even if it is not visible on the page layout.

It's important to note that when cloning a record, any changes you make to the original record after it has been cloned will not be reflected in the cloned record. The cloned record is a snapshot of the original record at the time of cloning, with the default values applied for any fields not explicitly set on the page layout.


  • What is the consideration while deleting an approval process?\

When deleting an approval process in Salesforce, there are several considerations and best practices to keep in mind to avoid unintended consequences and maintain data integrity. Here are some important considerations:

  • Impact on Records: Deleting an approval process might impact records that are currently in the approval process or have been previously approved or rejected. If you delete an approval process that is still in progress, the approval records associated with it will be removed, and the approval history will be lost. Carefully review the records associated with the approval process before proceeding with deletion.

  • Active vs. Inactive Approval Processes: If the approval process is active, it might be in use and affecting record approvals. Ensure that there are no pending or active approvals before attempting to delete the approval process.

  • Related Automation: Check for any related automation, such as workflows, process builder, or triggers, that might rely on the approval process being deleted. Removing an active approval process might cause errors or unexpected behavior in related automation.

  • Custom Buttons and Links: If there are custom buttons or links on record pages that trigger the approval process, consider updating or removing them if necessary to avoid potential issues after the approval process is deleted.

  • Approval History: Deleting an approval process will remove the approval history associated with it. If you need to retain the approval history for reporting or auditing purposes, consider exporting the data before deletion.

  • User Communication: Inform users and stakeholders about the pending deletion of the approval process and its potential impacts on the business processes. Ensure that everyone is aware of the change and any necessary adjustments.

  • Test in Sandbox: Before deleting an approval process in the production environment, perform thorough testing in a sandbox or a non-production environment to identify any potential issues and verify the impact.

  • Record Locks: Deleting an active approval process might remove record locks imposed by the approval process, which could potentially allow users to modify records in ways not intended. Ensure that this change aligns with your data governance policies.

  • Backup and Restore: Before proceeding with deletion, consider taking a backup or creating a change set with the approval process configuration for future reference or restoration if needed.

To delete an approval process in Salesforce:

  • Go to Setup and navigate to "Object Manager."

  • Select the object for which the approval process is defined.

  • Under "Approval Process," find the approval process you want to delete.

  • Click on the "Del" (delete) link next to the approval process.

  • Confirm the deletion when prompted.


  • What happens during Lead merging?

During Lead merging in Salesforce, two or more lead records are combined into a single, master lead record. When merging leads, Salesforce follows specific rules and considerations to ensure data integrity and minimize data loss. Here's what happens during the lead merging process:

  • Selecting the Master Record: When you merge two or more lead records, you must choose one of the leads as the "Master Record." The master lead will retain its existing data, and the information from the other leads (known as "Secondary Records") will be merged into this master record.

  • Field-Level Data Merging: For each field on the lead records being merged, Salesforce determines which values should be retained. The values from the master lead typically take precedence over the secondary records. However, if the master lead's field is blank and a secondary record has a value, the secondary record's value will replace the blank value on the master record.

  • Duplicate Rules and Matching Rules: Salesforce considers active Duplicate Rules and Matching Rules during the lead merging process. If any duplicate rules are triggered based on the merging leads, they will prevent the merge until the duplicate issue is resolved.

  • Field History Tracking: Merging leads updates the field history tracking for the master record, showing the changes made during the merge.

  • Conversion of Secondary Records: If any secondary leads are converted to contacts, accounts, or opportunities, the converted records and related data will be added to the appropriate objects. The conversion process follows the standard lead conversion rules.

  • Campaign Association: The campaign memberships of the secondary leads may be added to the master lead, subject to campaign influence rules.

  • Deletion of Secondary Records: After the merge is complete, the secondary lead records are deleted from the database. However, you can recover these records from the recycle bin within 15 days if needed.

  • Ownership and Audit Trail: The lead owner of the master record remains unchanged, and the audit trail tracks the merge activity.


  • What is Apex Hammer?

As of my last knowledge update in September 2021, "Apex Hammer" is not a widely known or official term within the Salesforce ecosystem. It is possible that this term has emerged or gained relevance after my last update, or it may be specific to a particular context or organization.

In the context of Salesforce, "Apex" refers to the programming language used for writing custom code on the platform, and it is mainly used for creating triggers, classes, and other server-side logic. Apex allows developers to extend the capabilities of Salesforce and customize the platform to suit specific business requirements.

If "Apex Hammer" is a term used in your organization or a specific context, it might be best to consult internal documentation, speak with colleagues or peers in your organization, or check with Salesforce experts to understand its specific meaning and implications accurately.


  • How do you convert 15 digit record Id to 18 digit Id in formula and validation rule?

n Salesforce formulas and validation rules, you can convert a 15-digit record ID to an 18-digit record ID using a combination of functions. The 18-digit ID format includes case sensitivity, which makes it suitable for use in formula fields and validation rules.

To convert a 15-digit record ID to an 18-digit ID in a formula or validation rule, you can use the following formula:

scss

Copy code

CASESAFEID(RecordId15)


Here's how it works:

  • RecordId15: Replace this with the 15-digit record ID that you want to convert to the 18-digit format.

  • CASESAFEID(): This function takes the 15-digit record ID as input and returns the corresponding 18-digit ID with case sensitivity.

For example, suppose you have a custom formula field named "Custom_Field__c" that you want to use to display the 18-digit ID for a custom object record. You can create a formula field with the following formula:

scss

Copy code

CASESAFEID(Id)

In this case, the "Id" refers to the standard 15-digit record ID field of the custom object. When you use this formula in the custom formula field, it will display the 18-digit version of the record ID with case sensitivity.


  • Is it possible to hard delete records using data loader?

As of my last knowledge update in September 2021, the Salesforce Data Loader tool does not provide a direct option to perform hard deletes on records. By default, Salesforce follows a "soft delete" mechanism where deleted records are moved to the Recycle Bin and can be restored within 15 days before being permanently deleted.

However, there are ways to achieve hard deletes using the Data Loader by following these steps:

  • Empty the Recycle Bin: Before performing the hard delete, you can use the "Empty" option in the Salesforce Recycle Bin to permanently delete all records currently in the Recycle Bin. This action will permanently remove all the deleted records, bypassing the 15-day retention period.

  • Perform Hard Delete via Data Loader: After emptying the Recycle Bin, you can use the Data Loader to delete records. When using Data Loader, the hard delete can be achieved by performing the Delete operation and setting the "HardDelete" flag to true.

To do this, you can create a CSV file with the record IDs of the records you want to hard delete, and include a custom field called "HardDelete__c" (or any other name you prefer) with a value of "true" for each record. Then, use the Data Loader to perform the Delete operation, mapping the "HardDelete__c" field to the "HardDelete" field in Salesforce.

However, it's important to exercise caution when performing hard deletes, as this action is irreversible and permanently removes the data from your Salesforce org. Hard deleting records can lead to data loss, and it is recommended to have proper backups or a data recovery plan in place before proceeding with hard deletes.


  • Is it possible to show validation errors in screen flow?

As of my last knowledge update in September 2021, Salesforce Flow (formerly known as Visual Workflow or Screen Flow) does not natively support displaying validation errors on screen flows. When validation rules are violated in a screen flow, the flow will halt, and the user will see a generic error message, such as "The flow failed to load."

However, there are workarounds to provide a more user-friendly experience and show custom validation error messages in screen flows:

  • Custom Error Screens: You can create custom error screens using the Flow Builder. When a validation rule is violated, you can use decision elements in the flow to check for the specific error conditions. If a validation error occurs, you can redirect the flow to a custom error screen that displays a user-friendly error message explaining the issue. From the error screen, users can be directed to fix the errors and continue with the flow.

  • Screen Components: You can use custom components developed using Lightning Web Components (LWC) or Aura Components within your flow screens. These custom components can provide more advanced validation and error handling capabilities compared to the standard flow elements. With custom components, you have more control over the user interface and can display custom error messages based on specific validation criteria.

  • Invocable Apex: You can use Invocable Apex actions within your flow to perform complex validation logic. Invocable Apex actions can return custom messages or error codes that you can then display to the user on screen flow screens.

  • Screen Flow Error Management (Pilot): Salesforce introduced Screen Flow Error Management as a pilot feature in Winter '22. This feature allows you to capture and handle errors within a flow and display custom error messages. You can check the Salesforce release notes for more information about this pilot feature's availability and functionality.


  • You have created a custom object. While creating a report on the object, you are not getting the option to select the object in the report builder. What could be the issue?

If you have created a custom object in Salesforce, but you are not seeing the option to select the object in the report builder, there are several possible reasons for this issue. Here are some common reasons and potential solutions:

  • Object Permissions: Ensure that you have the necessary permissions to create reports on the custom object. Check your profile or permission set to verify that you have the "Create" and "Read" access to the object. Also, ensure that the object's sharing settings allow you to access its records.

  • Object Visibility: Verify that the custom object is marked as "Deployed" rather than "In Development." Objects in the "In Development" status are not available for reporting until they are deployed.

  • Report Type: Check if a report type exists for the custom object. Report types define which objects and fields are available for reporting. If a report type is not created or is not associated with the custom object, you won't be able to create reports for that object.

  • Field Level Security: Ensure that the fields you want to include in the report are visible to your profile or permission set. Field-level security can restrict access to certain fields, preventing them from being used in reports.

  • Record Visibility: If you don't have any records in the custom object, the object may not appear in the report builder until at least one record is created.

  • Report Builder Edition Limitations: Some editions of Salesforce may have limitations on the number of custom objects that can be included in a report. Ensure that your edition allows for the desired number of custom objects in a report.

  • System Maintenance: Occasionally, issues may arise due to temporary system maintenance or caching. Try refreshing the page or logging out and logging back into Salesforce to see if the object appears.

  • Field Type Limitations: If the custom object has fields of certain data types that are not supported for reporting (e.g., Long Text Area or Multi-Select Picklist), it may impact the object's availability in the report builder.


  • What are the possible statuses of a permission set group?

As of my last knowledge update in September 2021, Salesforce introduced "Permission Set Groups" as a pilot feature in the Winter '21 release. Permission Set Groups allow you to bundle multiple permission sets together and assign them to users as a group. Permission Set Groups make it easier to manage permissions for users who need a combination of multiple permission sets.

During the pilot phase, Permission Set Groups may have limited functionality and options compared to other standard Salesforce features. However, based on the documentation available at that time, the possible statuses of a Permission Set Group were as follows:

  • "In Development": A Permission Set Group is in development when it is being created or modified. In this status, changes to the group are not yet deployed to users.

  • "Deployed": Once the changes to the Permission Set Group are completed and ready to be used, the group can be marked as "Deployed." In this status, the group is available for assignment to users.


  • How can we enable email approval response? Mention a few response keywords which will approve/reject the request

To enable email approval response in Salesforce, follow these steps:

  • Enable Email Approval Response:

    • Go to Setup in Salesforce.

    • In the Quick Find/Search bar, type "Approval Settings" and select "Approval Settings."

    • Scroll down to the "Email Approval Response" section.

    • Check the "Allow approvers to approve/reject approval requests via email" checkbox.

    • Save your changes.

Once email approval responses are enabled, the approvers can respond to approval requests directly from their email without logging into Salesforce.

  • Response Keywords for Approval/Rejection: The email approval response functionality in Salesforce allows approvers to use specific keywords in the email subject or body to indicate their approval or rejection of the request. The keywords are not case-sensitive, and the subject and body of the email are both checked for these keywords.

The common response keywords for approval are:

  • "Approve"

  • "Approved"

  • "Yes"

The common response keywords for rejection are:

  • "Reject"

  • "Rejected"

  • "No"

For example, if an approver receives an email with an approval request, they can respond with "Approve" or "Approved" in the email subject or body to approve the request. Similarly, they can respond with "Reject" or "Rejected" to reject the request.


  • You are not getting an option to create list custom settings. Which setting needs to be enabled?


In Salesforce, to enable the ability to create List Custom Settings, you need to ensure that the "Custom Settings" feature is enabled for your organization. By default, Custom Settings are enabled in most Salesforce orgs, but it's possible that they might be restricted in some instances.

To check if Custom Settings are enabled and to enable them if necessary, follow these steps:

  • Go to Setup in Salesforce.

  • In the Quick Find/Search bar, type "Custom Settings" and select "Custom Settings."

  • In the "Custom Settings" page, check if you can see the list of existing Custom Settings. If you see an empty page or an error message stating that the feature is not available, it means that Custom Settings are not currently enabled for your org.

  • To enable Custom Settings, you need to contact Salesforce Support or your Salesforce Administrator. They will have the necessary permissions and access to Salesforce Support to enable the feature for your organization.

  • Once Custom Settings are enabled, you should be able to create List Custom Settings by clicking on the "New" button on the Custom Settings page.


  • Once a lead is converted it is not visible anymore in the UI. Is there any permission available to view converted leads?

In Salesforce, once a lead is converted, it is typically no longer visible in the standard "Leads" tab or list views, as it gets automatically moved to other standard objects, such as "Contacts," "Accounts," and "Opportunities" (if applicable). However, there are ways to view converted leads in Salesforce:

  • Converted Leads Report: You can create a custom report to view converted leads. Use the "Lead History" report type or create a custom report type that includes both Leads and the destination object (e.g., Contacts, Accounts, Opportunities). In the report, you can add filters to show only converted leads and any relevant information from the converted objects.

  • Archived Converted Leads: Salesforce archives converted leads by default, and they are available for viewing under the "Archived Leads" section. To access the archived leads, go to the "Leads" tab and click on the "View" drop-down menu. From there, select "Archived Leads" to see the list of converted leads.

  • View as a Contact: If you know the name or other identifying details of the lead that was converted, you can search for the converted contact in the "Contacts" tab using the search bar.

  • Custom Permission or Sharing Settings: Salesforce administrators can set up custom permissions or sharing settings to allow specific users or profiles to view converted leads. However, it's essential to carefully consider the data privacy and security implications before granting such access.


  • You are trying to convert a master detail relationship field to lookup relationship. But you are not able to see the change field type button. What could be the reason?


In Salesforce, the "Change Field Type" button is not available for all types of fields, and there are specific limitations and considerations when it comes to converting a Master-Detail relationship field to a Lookup relationship field. Here are some possible reasons why you might not be seeing the "Change Field Type" button:

  • Existing Records: If there are existing records in the object that contains the Master-Detail relationship field, you cannot directly convert the field to a Lookup relationship. Changing the field type could potentially lead to data loss or inconsistencies. You need to first ensure that there are no child records related to the Master object before attempting to convert the field type.

  • Flows or Process Builder Dependencies: If the Master-Detail relationship field is being used in Flows or Process Builder workflows, it might prevent the option to change the field type. Check for any active or inactive processes that reference the field and update them accordingly before changing the field type.

  • Data Skew: If the Master-Detail relationship field is part of a relationship with a high data skew, Salesforce might prevent you from converting the field type directly. Data skew occurs when a single parent record has an excessive number of child records, leading to performance issues. In such cases, you may need to address the data skew before converting the field type.

  • Field-Level Security: Ensure that you have the necessary permissions to modify fields and make schema changes in Salesforce. If your profile or permission set does not have the required permissions, you won't see the option to change the field type.

  • Data Type Incompatibility: Lookup relationship fields have certain limitations compared to Master-Detail relationship fields. For example, you cannot perform roll-up summary calculations on Lookup relationship fields. If your existing configuration relies heavily on Master-Detail features, converting to a Lookup relationship might not be straightforward.


  • One of the users in your org is not able to create campaigns. You checked the profile/ permission sets and ensured that he has access to create campaigns. What could be the reason?

If a user in your Salesforce org has the necessary profile or permission set permissions to create campaigns, but they are still unable to do so, there are a few other factors that could be causing the issue. Here are some common reasons why a user might not be able to create campaigns:

  • Campaign Object Access: While the user's profile or permission set may grant them access to create campaigns, there could be other factors at the object level that are restricting their access. Check the Organization-Wide Defaults (OWD) for the Campaign object and verify that the user has the "Create" permission at the object level.

  • Record Types: Campaigns in Salesforce can be associated with specific record types, which may have different page layouts and field requirements. Ensure that the user's profile or permission set allows access to the appropriate record type for creating campaigns.

  • Validation Rules: Check if there are any active validation rules on the Campaign object that might be blocking the creation of campaigns. Validation rules can enforce specific data requirements or conditions that must be met when creating or updating records.

  • Campaign Member Status: If campaigns in your org are using Campaign Member Status values, make sure the user has the necessary permissions to create or update Campaign Member Status records.

  • Apex Triggers or Processes: Apex triggers or processes can also affect the creation of campaigns by performing additional actions or imposing additional conditions. Check if there are any triggers or processes on the Campaign object that might be interfering with the user's ability to create campaigns.

  • Managed Package Restrictions: If your org has installed any managed packages that relate to campaigns or involve sharing and visibility settings, the user's access to campaigns could be affected by the package's configuration.

  • Field Level Security: Verify that the user has the necessary Field Level Security (FLS) permissions to access and update all required fields when creating a campaign. Lack of FLS permissions for specific fields can prevent successful record creation.

  • User License: Ensure that the user has an active user license and is not deactivated or in a frozen state. Inactive or frozen users won't be able to create new records, including campaigns.


  • What happens when you try to delete a public group?

When you try to delete a public group in Salesforce, the deletion process depends on whether the public group is empty (contains no members) or if it has one or more members. Here's what happens in each scenario:

  • Deleting an Empty Public Group: If the public group is empty (contains no members), you can delete it without any issues. When you delete an empty public group, the group and its associated data, such as group assignments and sharing settings, will be permanently removed from the system.

  • Deleting a Public Group with Members: If the public group has one or more members, you won't be able to delete it directly. Salesforce prevents the deletion of public groups that have members to avoid accidental data loss and ensure that sharing and collaboration settings are maintained correctly.

To delete a public group with members, you'll first need to remove all the group members, and then you can proceed with the deletion. Here's how you can do it:


  • What happens when you try to delete a queue?

When you try to delete a queue in Salesforce, the deletion process depends on whether the queue is empty (contains no records) or if it has one or more records assigned to it. Here's what happens in each scenario:

  • Deleting an Empty Queue: If the queue is empty (contains no records), you can delete it without any issues. When you delete an empty queue, the queue and its associated data, such as the queue members and their related records, will be permanently removed from the system.

  • Deleting a Queue with Records Assigned: If the queue has one or more records assigned to it, you won't be able to delete it directly. Salesforce prevents the deletion of queues that have records assigned to avoid accidental data loss and ensure that record ownership and sharing settings are maintained correctly.

To delete a queue with records assigned, you'll first need to reassign or remove all the records from the queue, and then you can proceed with the deletion. Here's how you can do it:



Top Salesforce Developer Interview Questions

  • What is Sandbox and the Type of Sandbox in Salesforce?

In Salesforce, a sandbox is a copy of your production organization that is used for various purposes such as development, testing, training, and staging without affecting the actual production data or processes. Sandboxes provide a safe and isolated environment for making changes, testing new features, and experimenting with configurations before deploying them to the live production environment.

Salesforce offers different types of sandboxes to cater to various needs and requirements. Each type of sandbox has its own characteristics and use cases. The available types of sandboxes are:

  • Developer Sandbox:

    • Use Case: Ideal for individual developers or small teams working on isolated projects.

    • Characteristics: A small-sized sandbox with limited storage and data. It is a cost-effective option for development and testing.

  • Developer Pro Sandbox:

    • Use Case: Suitable for larger development teams with more data and complex configurations.

    • Characteristics: Larger than Developer Sandbox with additional storage and data limits. It allows more comprehensive testing and development activities.

  • Partial Copy Sandbox:

    • Use Case: Designed for testing and quality assurance with realistic data scenarios.

    • Characteristics: A mid-sized sandbox that contains a subset of the production data, including standard and custom objects and records.

  • Full Sandbox:

    • Use Case: Intended for testing and staging environments that need an exact replica of the production data.

    • Characteristics: It is a full copy of the production environment, including all data, standard and custom objects, and configurations. Provides the most comprehensive testing capabilities but requires significant storage space.

  • Sandboxes for Sandboxes (Sandbox Templates):

    • Use Case: Used to create multiple copies of a sandbox with the same data and configuration.

    • Characteristics: They are used as templates to create multiple instances of a specific type of sandbox quickly.

  • Scratch Org (Not a traditional sandbox type):

    • Use Case: Aimed at developers working with Salesforce DX (Salesforce Developer Experience).

    • Characteristics: A temporary, disposable org that is created and used for specific development tasks. Scratch orgs are typically short-lived and easily created and deleted using Salesforce DX tools.


  • What is Cloud Computing?

Cloud computing in Salesforce refers to the delivery of computing services over the internet through a network of remote servers. Instead of running applications and storing data on local computers or in on-premises data centers, cloud computing allows users to access software, platforms, and infrastructure hosted and managed by a cloud service provider, such as Salesforce.

Salesforce is a cloud-based customer relationship management (CRM) platform that provides various cloud services to help businesses manage their sales, marketing, customer support, and other essential operations. The key characteristics of cloud computing in Salesforce include:

  • On-Demand Service: Users can access Salesforce applications and services anytime, anywhere, as long as they have an internet connection. This on-demand nature allows for flexibility and remote access to critical business data and functionality.

  • Scalability: Salesforce's cloud infrastructure enables automatic scalability, allowing businesses to adjust their computing resources based on demand. This means that organizations can quickly scale up or down their CRM usage as their business needs change without having to invest in physical hardware or infrastructure.

  • Multi-Tenancy: Salesforce employs a multi-tenant architecture, meaning that multiple customers (organizations or users) share the same infrastructure and resources. Each customer's data is securely segregated and isolated, providing a cost-effective and efficient model for delivering services.

  • Pay-as-You-Go: Salesforce follows a subscription-based model, where customers pay for the services they use on a per-user, per-month basis. This eliminates the need for large upfront capital expenditures and allows businesses to control costs based on their actual usage.

  • Automatic Updates and Maintenance: Salesforce handles the infrastructure maintenance, security updates, and software patches, ensuring that customers are always on the latest version of the platform without the need for manual updates.

  • Security and Compliance: Salesforce invests heavily in security measures to protect customer data. Their data centers meet industry standards and comply with various regulatory requirements to ensure data integrity and confidentiality.


  • What is Iaas?

Salesforce primarily provides Software-as-a-Service (SaaS) and Platform-as-a-Service (PaaS) offerings, but it does not offer Infrastructure-as-a-Service (IaaS) directly. Let's explore the differences between these three cloud service models:

  • Software-as-a-Service (SaaS): SaaS is a cloud computing model where software applications are hosted and delivered over the internet by a cloud service provider. In the context of Salesforce, SaaS refers to the Salesforce CRM platform, including Sales Cloud, Service Cloud, Marketing Cloud, and other Salesforce products. With SaaS, users can access the software through a web browser without the need for installing and managing software locally. Salesforce takes care of the underlying infrastructure, maintenance, security, and updates, allowing users to focus on using the CRM functionality to manage customer relationships and business processes.

  • Platform-as-a-Service (PaaS): PaaS is a cloud computing model that provides a platform and environment for developers to build, deploy, and manage applications without the complexity of managing underlying infrastructure. Salesforce offers a PaaS called Salesforce Platform (formerly known as Force.com), which allows developers to build custom applications and extend the functionality of Salesforce. It provides tools, services, and APIs to create and run applications on top of the Salesforce infrastructure.

  • Infrastructure-as-a-Service (IaaS): IaaS is a cloud computing model that provides virtualized computing resources over the internet. It includes virtual machines, storage, networking, and other essential computing resources that are typically provided as a service by cloud service providers. IaaS allows businesses to rent IT infrastructure on a pay-as-you-go basis, avoiding the need for investing in physical hardware and data centers. Examples of IaaS providers include Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP).

While Salesforce does not offer IaaS directly, some organizations might use Salesforce in combination with IaaS providers to host and integrate additional services or applications outside of the Salesforce ecosystem. For example, companies might use Salesforce for their CRM needs (SaaS), build custom applications on Salesforce Platform (PaaS), and host other IT infrastructure or services on an IaaS platform.


  • What is PaaS?


PaaS stands for Platform-as-a-Service, and in the context of Salesforce, it refers to the cloud computing model that provides a platform and environment for developers to build, deploy, and manage custom applications and solutions. Salesforce's PaaS offering is known as Salesforce Platform (formerly known as Force.com).

Salesforce Platform offers a robust set of tools, services, and resources that enable developers to create and customize applications on top of the Salesforce infrastructure. Some key features of Salesforce Platform as a PaaS include:

  • Development Environment: Salesforce Platform provides a web-based integrated development environment (IDE) called "Salesforce Developer Console" or "Setup" where developers can write, debug, and deploy code and customizations.

  • Apex Language: Apex is Salesforce's proprietary programming language similar to Java. Developers can use Apex to write server-side code that executes within the Salesforce platform to interact with data and perform custom business logic.

  • Visualforce Pages: Visualforce is a markup language that allows developers to create custom user interfaces within Salesforce. It enables the creation of custom pages and components that integrate seamlessly with standard Salesforce objects and data.

  • Lightning Components: Lightning Components is a modern framework for building reusable UI components that can be used in both Salesforce Classic and Salesforce Lightning Experience. It enables developers to create responsive and interactive user interfaces.

  • Database and Data Model: Salesforce Platform provides a scalable and flexible database structure with objects, fields, and relationships. Developers can create custom objects and fields to store data specific to their application requirements.

  • API Integrations: Salesforce Platform offers robust APIs (Application Programming Interfaces) that allow developers to integrate Salesforce with external systems and services, enabling seamless data exchange and automation.

  • Security and Compliance: Salesforce Platform ensures the security and privacy of data with built-in security features and compliance certifications.

Using Salesforce Platform as a PaaS, developers can extend and customize the functionality of Salesforce, build custom applications for specific business needs, and integrate Salesforce with other systems to create comprehensive and tailored solutions.



  • What is Saas?

SaaS stands for Software-as-a-Service, and in the context of Salesforce, it refers to the cloud computing model where Salesforce delivers its customer relationship management (CRM) software as a service over the internet. Salesforce's SaaS offering is known as Salesforce CRM, which includes various products such as Sales Cloud, Service Cloud, Marketing Cloud, Commerce Cloud, and more.

With SaaS, users can access the Salesforce CRM platform through a web browser without the need for installing or maintaining software locally on their computers. The software and data are hosted on remote servers owned and managed by Salesforce, and users can access the system from anywhere with an internet connection.

Key features and benefits of Salesforce SaaS (Salesforce CRM) include:

  • Accessibility: Users can access Salesforce CRM from any device with a web browser, providing flexibility and remote access to critical business data and functionality.

  • Automatic Updates: Salesforce manages all software updates and maintenance, ensuring that users are always on the latest version of the platform without the need for manual updates.

  • Scalability: Salesforce's cloud infrastructure allows for automatic scalability, enabling businesses to adjust their user licenses and usage based on demand.

  • Data Security: Salesforce invests heavily in security measures to protect customer data. The platform complies with industry standards and regulatory requirements to ensure data integrity and confidentiality.

  • Customizability: While Salesforce CRM provides a powerful set of standard features, it is highly customizable to meet specific business needs. Organizations can tailor the platform to their unique processes and workflows.

  • Integration Capabilities: Salesforce offers a wide range of pre-built integrations and APIs (Application Programming Interfaces) that allow seamless data exchange and integration with other systems and applications.

  • Analytics and Reporting: Salesforce CRM provides robust reporting and analytics tools to help users gain insights into their data and make data-driven decisions.

By offering its CRM software as a service, Salesforce enables businesses of all sizes to leverage sophisticated CRM capabilities without the need for large upfront capital investments in hardware, software, and infrastructure. This SaaS model allows organizations to focus on their core business activities and customer interactions while Salesforce takes care of the underlying technology and infrastructure.


  • Type of Object Relationship in Salesforce?

In Salesforce, there are several types of object relationships that allow you to establish connections and associations between different objects. These relationships define how records in one object are related to records in another object. The primary types of object relationships in Salesforce are:

  • Master-Detail Relationship:

    • The Master-Detail relationship is a parent-child relationship between two objects. In this relationship, the child object (detail) is considered to be dependent on the parent object (master).

    • The master object controls certain behaviors of the detail object, such as ownership and security. When the master record is deleted, all its related detail records are automatically deleted (cascade deletion).

    • The relationship field on the detail object is a required field and always points to a single parent record.

  • Lookup Relationship:

    • The Lookup relationship is also a parent-child relationship between two objects, but it is not as tightly coupled as the Master-Detail relationship.

    • In a Lookup relationship, the child object (lookup) has a reference to the parent object (lookup target) through a lookup field.

    • Deleting a parent record does not automatically delete the related child records; instead, the lookup field on the child record is cleared (or optionally set to a default value).

    • The relationship field on the child object is not required and can be left blank.

  • Hierarchical Relationship:

    • The Hierarchical relationship is a special type of relationship used in the User object to create a hierarchy within the user records.

    • In this relationship, users can be associated with their managers, and it is typically used in scenarios where there is a reporting structure.

    • The Hierarchical relationship is read-only and is based on the User field "Manager ID."

  • Many-to-Many Relationship:

    • Many-to-Many relationships are established using junction objects, which are custom objects used to connect two other objects in a many-to-many relationship.

    • Junction objects allow you to associate multiple records of one object with multiple records of another object.

    • Each junction object record represents a unique combination of the two related records, providing a way to manage complex relationships.


  • What is Junction Object in Salesforce?

a Junction Object is a custom object used to create a many-to-many relationship between two other objects. It acts as an intermediary that connects and relates records from two different objects together. Junction objects enable you to associate multiple records of one object with multiple records of another object, allowing you to model complex relationships between data.

The concept of Junction Objects is commonly used when you have a scenario where:

  • Two objects have a many-to-many relationship with each other, meaning that one record in the first object can be related to multiple records in the second object, and vice versa.

  • You need to store additional information or data specific to the relationship between the two objects.

A typical example of using a Junction Object is in a system that manages events and attendees. In such a scenario:

  • The "Event" object represents individual events, and the "Contact" object represents individual attendees.

  • An "Event" can have multiple attendees (many Contacts can be related to one Event), and a Contact can attend multiple events (many Events can be related to one Contact).

To create this many-to-many relationship, you would create a Junction Object, such as "Event Attendee," that has lookup fields to both the "Event" and "Contact" objects. Each record in the "Event Attendee" object represents a unique combination of an Event and a Contact, indicating that the Contact is attending the specific Event.

The benefits of using Junction Objects are:

  • It allows you to maintain complex data relationships without creating redundant data or violating data normalization principles.

  • You can store additional information or attributes specific to each relationship between the objects within the Junction Object records.

  • It provides a flexible and scalable way to manage complex data structures and business processes.


  • What is the difference between Role and Profiles?

In Salesforce, both Roles and Profiles are used to control access and permissions for users, but they serve different purposes and have distinct functionalities. Here are the key differences between Roles and Profiles:

  • Role:

  • Role is used to define the hierarchy and reporting structure within your Salesforce organization.

  • Roles are typically used to assign record-level access based on the organization's reporting structure. Users in higher roles can access records owned by users in subordinate roles.

  • Roles help define the data visibility and sharing settings for records, ensuring that users can only see the data they are supposed to based on their position in the role hierarchy.

  • Roles are commonly used in conjunction with Sharing Rules and Manual Sharing to further control data access.

  • The role hierarchy does not grant additional permissions beyond data access, and it does not affect object or system-level permissions.

  • Profile:

  • Profile is used to define the permissions and access levels that a user has within Salesforce.

  • Profiles control the overall system-level permissions and features that users can access. These permissions include creating, editing, and deleting records for specific objects, running reports, viewing the setup menu, and more.

  • Profiles determine what users can do in the system and what data they can access. For example, a profile can define whether users can create or delete accounts, opportunities, or any other objects.

  • Each user in Salesforce is assigned a profile, and their permissions are determined by that profile. Profiles are typically assigned based on the user's job role and responsibilities.

  • Profiles are essential for controlling the overall security and functionality of the Salesforce system.


  • How many way we have in Salesforce for Sharing?

In Salesforce, there are several ways to manage data sharing and control access to records. These mechanisms allow you to share records with specific users, groups, roles, or territories based on your organization's requirements. The main ways of sharing data in Salesforce are:

  • Role Hierarchy:

    • The Role Hierarchy is a built-in feature that defines the reporting structure and organizational hierarchy in Salesforce.

    • It allows users in higher roles to access the records owned by users in subordinate roles, creating a top-down data access model.

    • Access levels can be set to "Read Only" or "Read/Write" for each level in the role hierarchy.

  • Sharing Rules:

    • Sharing Rules are used to automatically extend access to records based on certain criteria, such as record owner or specific field values.

    • These rules can be defined for certain objects and provide "Read Only" access to records that meet the defined criteria.

    • Sharing Rules are useful when you need to share records with a broader group based on specific conditions.

  • Manual Sharing:

    • Manual Sharing allows individual users with appropriate permissions to manually share specific records with other users or groups.

    • This method is typically used when you need to share specific records outside the scope of the role hierarchy or sharing rules.

  • Apex Sharing:

    • Apex Sharing is a programmatic way to share records using custom Apex code.

    • It allows you to programmatically define sharing rules and extend or remove record access for specific users or groups.

  • Criteria-Based Sharing:

    • Criteria-Based Sharing allows you to define criteria for sharing records based on field values on the record or related records.

    • This feature is available through the "Criteria-Based Sharing" button on the sharing-related list of a custom object.

  • Account Teams and Opportunity Teams:

    • Account Teams and Opportunity Teams allow you to grant access to accounts and opportunities to a group of users working together on specific records.

    • Account Teams can be used to share access to an account with users who are not in the role hierarchy.

  • Territory Management:

    • Territory Management is used to define and manage sales territories, which helps determine record ownership and sharing for accounts and opportunities.


  • What are Sharing Rules?

Sharing Rules in Salesforce are a mechanism that allows you to automatically extend record access to specific users or groups based on predefined criteria. They provide a way to share records beyond the default organization-wide settings and the role hierarchy. Sharing Rules are particularly useful when you need to provide "Read Only" access to certain records to a broader group of users without manually sharing each record individually.

Here's how Sharing Rules work:

  • Criteria Definition: Sharing Rules are created based on specific criteria, such as record owner, record type, or other field values on the record. For example, you can create a Sharing Rule to share all records with a specific record type with a particular group of users.

  • Record Access Level: When creating a Sharing Rule, you define the access level that the shared records will have. You can choose between "Read Only" access or "Read/Write" access.

  • Object Scope: Sharing Rules are specific to an object and apply only to the object for which they are created. You can create Sharing Rules for standard and custom objects.

  • Active Users: Sharing Rules can only be created for active users in the organization. Inactive or deactivated users are not eligible to be included in Sharing Rules.

  • Order of Execution: Sharing Rules are evaluated in a specific order during the record access evaluation process. They are executed after the organization-wide defaults, role hierarchy, and manual sharing, but before criteria-based sharing.

It's important to note the limitations and considerations when using Sharing Rules:

  • Sharing Rules can only extend access; they cannot restrict access granted by the role hierarchy or other sharing mechanisms.

  • Sharing Rules cannot be used to grant "Delete" access; they can only provide "Read Only" or "Read/Write" access.

  • There is a limit to the number of active Sharing Rules per object, so carefully consider your sharing requirements.

  • Sharing Rules are generally used for specific scenarios and should not be relied upon for managing widespread data access.


  • What is Manual Sharing?

Manual Sharing refers to the ability to manually grant or revoke record access to individual users, roles, or groups on a case-by-case basis. It is a feature that allows administrators or users with appropriate permissions to share specific records with others outside the default organization-wide settings, role hierarchy, and sharing rules.

Here's how Manual Sharing works:

  • Accessing Manual Sharing: Manual Sharing can be accessed from the "Sharing" button on the detail page of a record. This button is available for certain objects where manual sharing is enabled, such as standard objects like Accounts, Contacts, Opportunities, Cases, and custom objects.

  • Record Access Levels: When sharing a record manually, you can specify the level of access to be granted. You can provide either "Read Only" access or "Read/Write" access to the user or group you are sharing with.

  • Record Owner's Control: The owner of a record has the primary control over who can share that record manually. By default, only the record owner, users above the owner in the role hierarchy, and administrators with the "Modify All Data" permission can manually share the record.

  • Granting and Revoking Access: Users with the appropriate permissions can add specific users, roles, or groups to the "Share With" list and set the desired access level. This process effectively grants access to the selected users for that particular record.

  • Visibility of Manual Shares: The manual shares made on a record are visible to users with the "View All" permission for that object or users above the owner in the role hierarchy. This allows administrators and higher-level users to see and manage the sharing settings applied to records.


  • What is Apex Sharing?

Apex Sharing in Salesforce refers to the programmatic way of sharing records with other users or groups using custom Apex code. It allows developers to extend or remove record access to specific users, roles, or public groups based on complex business logic or conditions that cannot be achieved through standard sharing settings, role hierarchy, or sharing rules.

Using Apex Sharing, developers can implement custom sharing logic that is tailored to the specific requirements of their organization. This is particularly useful when there is a need for more sophisticated and fine-grained control over data access beyond what can be achieved with standard Salesforce sharing mechanisms.

Here are some key points to understand about Apex Sharing:

  • Programmatic Control: Apex Sharing provides a way to programmatically share records by inserting records into the "ObjectShare" object. Each record in the "ObjectShare" object represents a shared record and includes the ID of the user or group being shared with, the access level (Read Only or Read/Write), and other relevant information.

  • Apex Classes and Triggers: Apex Sharing is typically implemented using custom Apex classes and triggers. Developers can write Apex code to determine when and how records should be shared or unshared based on specific business rules and conditions.

  • Access Level: Similar to other sharing mechanisms in Salesforce, Apex Sharing allows you to control the access level for shared records. You can specify whether the shared users have "Read Only" access or "Read/Write" access to the records.

  • Sharing Calculations: Apex Sharing is executed as part of the "Share" calculation process in Salesforce. It occurs after the standard sharing settings, role hierarchy, sharing rules, and manual sharing have been evaluated.

  • System Context: Apex Sharing is performed in the system context, which means that it is not bound by user permissions. Therefore, it's crucial to ensure that the sharing logic is implemented securely and adheres to data security best practices.


  • Type of Flow in Salesforce?

In Salesforce, there are several types of Flows that you can create to automate and streamline business processes. Flows are a declarative way to build applications and workflows without the need for writing code. Each type of flow serves a specific purpose and is designed to solve different use cases. The main types of Flows in Salesforce are:

  • Screen Flows:

    • Screen Flows are the most common type of Flows in Salesforce.

    • They are used to create guided user interfaces (UI) for collecting data or performing actions.

    • Screen Flows present a series of screens to the user, and users input data or make selections on each screen until the flow reaches a final outcome.

    • Screen Flows can be used for data entry, record updates, lead capture, surveys, and various other user interactions.

  • Auto-launched Flows:

    • Auto-launched Flows do not have a user interface like Screen Flows; they run in the background automatically.

    • They are triggered by process automation tools like Process Builder, Workflow Rules, Apex triggers, or even scheduled actions.

    • Auto-launched Flows are typically used for more complex automation, data manipulation, and integration scenarios.

  • Lightning Flows:

    • Lightning Flows are an enhanced version of Screen Flows, built using the Lightning Flow Builder with a modern and interactive user interface.

    • They are designed to take advantage of the Salesforce Lightning Experience.

    • Lightning Flows offer improved user experience and are more customizable compared to traditional Screen Flows.

  • Interview Flows:

    • Interview Flows are a type of Screen Flow that can be embedded on a Visualforce page or Lightning component.

    • They allow developers to build custom user interfaces and experiences by combining the power of flows with custom code.

  • Flow Builder:

    • The Flow Builder is a drag-and-drop tool provided by Salesforce to create, edit, and manage all types of flows, including Screen Flows and Auto-launched Flows.

    • It offers a visual interface for building flows without writing code.


  • When to use Flow vs Apex?

The decision to use Flow or Apex in Salesforce depends on the complexity of the business requirement, the data manipulation needed, the user experience, and the development skills available. Here are some general guidelines to help you determine when to use Flow vs. Apex:

Use Flow When:

  • Declarative Automation: Flows are ideal for building declarative automation without writing code. They allow administrators and business users to create and maintain complex workflows using a visual interface.

  • Guided User Experience: Flows are suitable for creating guided user interfaces with screens and input forms. They can be used to streamline data entry and improve the user experience.

  • Simple Automation: For straightforward automation scenarios, such as updating fields, creating records, or sending email alerts, Flows can often accomplish the task without the need for Apex.

  • Integration: Flows can handle basic data integration scenarios using the "Get Records" and "Update Records" elements. They are suitable for straightforward data transformation and updates between objects.

  • Quick Development: Flows can be developed more rapidly compared to writing Apex code, making them a good choice for projects with tight timelines.

Use Apex When:

  • Complex Business Logic: For intricate business logic or complex data manipulations that cannot be achieved with Flows, Apex is necessary. Apex provides more control and flexibility when dealing with complex calculations and algorithms.

  • Bulk Data Processing: If you need to process large volumes of records efficiently, Apex is the best choice. It allows for bulkification, which can handle thousands of records in a single operation.

  • Performance Optimization: For performance-critical scenarios, where efficiency is paramount, Apex can be fine-tuned to optimize data processing and reduce execution time.

  • Custom Integrations: When you need to integrate with external systems using APIs, web services, or callouts, Apex can handle more advanced integration scenarios.

  • Asynchronous Processing: Apex supports asynchronous execution, allowing you to run code in the background or schedule tasks for later execution, which is not achievable with Flows.

In some cases, a combination of Flow and Apex may be the most appropriate approach. For example, you might use Flow to handle the user interface and initial data processing, and then invoke an Apex method for more complex data manipulation or integration.


  • Best practices for Salesforce Flow?

Best practices for Salesforce Flow can help ensure that your flows are well-designed, efficient, and maintainable. Here are some key best practices to consider when working with Salesforce Flow:

  • Clearly Define the Objective:

    • Before creating a flow, clearly define the objectives and requirements it should fulfill. Understand the business process you want to automate or improve, and identify the data and user interactions involved.

  • Start Simple and Iterative:

    • Begin with a simple flow and gradually add complexity as needed. Avoid building overly complex flows from the start, as it can make debugging and maintenance more challenging.

  • Use Screen Flows for User Interaction:

    • Use Screen Flows when you need to interact with users. Keep the flow concise, and ensure the screens have clear instructions and user-friendly layouts.

  • Utilize Flow Templates and Resources:

    • Leverage flow templates and Salesforce's online resources to jump-start your flow development. The Salesforce community often shares useful flow examples and best practices.

  • Test Thoroughly:

    • Test your flow thoroughly to ensure it works as expected and handles different scenarios and edge cases. Use debug tools and run test runs to identify and resolve issues.

  • Use Subflows for Reusability:

    • If you have common logic or functionality that will be used across multiple flows, consider creating subflows. Subflows allow you to reuse the same logic in different flows, promoting maintainability and consistency.

  • Leverage Custom Metadata Types for Configurability:

    • For configurable flows, consider using Custom Metadata Types to allow administrators to modify flow behavior without changing the flow's underlying structure.

  • Bulkify Record Processing:

    • If your flow processes a large number of records, use Fast Lookup and Fast Update elements to handle bulk data efficiently.

  • Avoid Hardcoding:

    • Avoid hardcoding values in the flow elements. Instead, use variables and formula resources to make the flow more flexible and adaptable to changes.

  • Error Handling and Messaging:

    • Implement error handling and provide meaningful error messages for users when something goes wrong. Make the error messages informative and user-friendly.

  • Document Your Flows:

    • Document your flows thoroughly, including their purpose, functionality, and any special considerations. Clear documentation helps other team members understand and maintain the flow.

  • Monitor Flow Usage:

    • Monitor flow usage and performance to identify potential bottlenecks or issues. Utilize Flow Usage Metrics to gather insights into flow execution and user interactions.


  • What is Apex? and when to use Apex over Flow?

Apex is a programming language developed by Salesforce specifically for building custom functionalities and automating complex business processes within the Salesforce platform. It is similar to Java in syntax and structure and is used to extend the capabilities of Salesforce by adding custom logic, performing data manipulation, and integrating with external systems. Apex is a server-side language, meaning it runs on the Salesforce servers and interacts with Salesforce data and metadata.

When to Use Apex Over Flow in Salesforce:

  • Complex Business Logic: Use Apex when you need to implement complex business logic that cannot be easily achieved with declarative tools like Flows. Apex provides more control and flexibility for intricate calculations and algorithms.

  • Data Manipulation: If you need to perform advanced data manipulation, such as complex data transformations, aggregations, or custom algorithms on records, Apex is the better choice.

  • Custom User Interfaces: Apex allows you to create custom user interfaces using Visualforce pages or Lightning Web Components (LWC). This is particularly useful when you need a highly customized and interactive user experience.

  • Integrations: When integrating with external systems, APIs, web services, or third-party platforms, Apex is often used to handle the integration logic and data exchange.

  • Asynchronous Processing: Apex supports asynchronous execution, allowing you to perform background processing, schedule tasks, and handle long-running operations asynchronously.

  • Bulk Data Processing: If you need to process large volumes of records efficiently, Apex can be bulkified to handle thousands of records in a single operation.

  • Custom Triggers and Workflows: Apex Triggers provide granular control over the record lifecycle and allow you to execute custom logic before or after record insert, update, or delete operations.

  • Unit Testing: Apex code can be unit tested using Apex Test Classes to ensure that the code is working as expected and to maintain code quality.

When to Use Flow Over Apex in Salesforce:

  • Declarative Automation: Use Flow when you can achieve your automation requirements using point-and-click configuration without writing code. Flows are ideal for building declarative automation.

  • Guided User Experience: Flows are suitable for creating guided user interfaces with screens and input forms, making data entry and user interactions more intuitive.

  • Simple Automation: For straightforward automation scenarios like updating fields, creating records, sending email alerts, etc., Flows are often more efficient to build and maintain than Apex code.

  • Quick Development: Flows can be developed more rapidly compared to writing Apex code, making them a good choice for projects with tight timelines.

  • Limited Development Skills: If you have limited coding resources or administrators with no coding experience, Flows provide a powerful tool for building custom logic without writing code.


  • What are Apex Best practices in Salesforce?

Apex Best Practices in Salesforce are guidelines and recommendations to ensure that your Apex code is well-designed, efficient, and maintainable. Following these best practices helps improve the performance, security, and stability of your Salesforce implementation. Here are some key Apex best practices to consider:

  • Bulkify Your Code:

    • Always design your Apex code to handle bulk data processing efficiently. Use collections (lists and maps) to work with multiple records at once and avoid DML operations inside loops.

  • Use Query Optimizer:

    • Optimize your SOQL queries to retrieve only the required fields and limit the number of records returned. Avoid using SOQL queries inside loops to prevent hitting governor limits.

  • Limit DML Operations:

    • Be mindful of the number of DML (Data Manipulation Language) operations (insert, update, delete) in a single transaction. Minimize the number of DML operations to stay within Salesforce governor limits.

  • Implement Error Handling:

    • Implement proper exception handling to handle unexpected errors and exceptions. Use try-catch blocks to gracefully handle exceptions and provide meaningful error messages.

  • Use Custom Settings for Configurations:

    • Utilize Custom Settings to store configurable data rather than hardcoding values in your Apex code. Custom Settings allow for easy customization without modifying code.

  • Avoid Hardcoding IDs:

    • Avoid hardcoding Salesforce record IDs in your code. Use dynamic SOQL queries or query the records programmatically to retrieve their IDs when needed.

  • Follow Trigger Best Practices:

    • If you are using triggers, adhere to trigger best practices such as bulkifying triggers, using trigger frameworks, and separating trigger logic from business logic.

  • Use Test Classes:

    • Always write unit test classes to cover your Apex code. Aim for a minimum of 75% code coverage in production to meet Salesforce deployment requirements.

  • Bulk Testing in Test Classes:

    • Design test classes to test bulk data scenarios and ensure that your code behaves correctly when processing large data volumes.

  • Avoid Recursive Triggers:

    • Prevent recursive triggers by using static variables or recursion controls to control the number of trigger executions.

  • Optimize SOSL Queries:

    • Optimize your SOSL queries by using search terms with wildcards at the end rather than the beginning of the string.

  • Consider Asynchronous Processing:

    • For long-running operations or operations that don't require immediate feedback, consider using asynchronous processing like Batch Apex or Queueable Apex.

  • Use Security Best Practices:

    • Implement security best practices to ensure that your Apex code adheres to Salesforce security standards and access controls.


  • What is Apex Trigger? and When we should use Apex Trigger?

In Salesforce, an Apex Trigger is a piece of Apex code that executes before or after specific data manipulation events, such as insert, update, delete, or undelete operations, on records of a particular object. Triggers are used to automate processes, enforce business rules, and perform additional logic on records based on specific criteria.

When to Use Apex Triggers in Salesforce:

  • Business Logic Enforcement:

    • Use triggers to enforce complex business rules that cannot be achieved with standard workflows or process builder. Triggers allow for granular control over record processing.

  • Cross-Object Logic:

    • When you need to perform actions or updates across related objects during record creation or update, triggers are the appropriate tool.

  • Field Updates Based on Related Data:

    • Use triggers when you need to update fields on a record based on data from related records or when performing calculations across related objects.

  • Data Validation:

    • Triggers can be used to validate data before it is saved to the database. You can check for specific conditions or perform data validation on multiple related records.

  • Prevent Recursive Updates:

    • If you need to prevent recursive updates caused by workflows or process builders, triggers can help control the order of execution and avoid infinite loops.

  • Complex Record Sharing:

    • For more advanced record sharing scenarios, especially when sharing rules and sharing settings are not sufficient, triggers can be used to manage record access and sharing.

  • Integration with External Systems:

    • Triggers can facilitate integration with external systems by sending data or making API calls when certain data changes occur.

  • Custom User Notifications:

    • Use triggers to send custom email notifications or push notifications to users based on specific criteria.


  • What is Apex Trigger Handler pattern?

  • What is Apex Trigger Framework? What are different Trigger Framework are available in Salesforce?

  • What is Async Apex in Salesforce? How many way we have for Async processing?

  • What is Batch job in Salesforce?

  • What is difference between Stateful and Stateless batch job?

  • What is mixed DML?

  • What is Lightning Data Service?

  • How to do communication between Lightning web component?

  • How to call Apex class in Lightning web component and how many way we have and when to use which option?

  • What are the basic difference between Application Event and Component Event in Aura component?

  • What is lightning messaging service?

  • What is lazy loading in LWC and how do lazy loading in LWC?

  • What are Design Attributes in Lightning Web Components?

  • What is web services?

  • What is the difference between SOAP and REST?

  • What is the difference between Enterprise WSDL and Partner WSDL?

  • Explain about Integration Patterns?

Top Salesforce Integration Interview Questions

  • What is Integration?

  • What is webservices?

  • Difference between JSON Vs XML ?

  • What is REST API ?

  • What is SOAP API ?

  • What is difference between SOAP and REST?

  • What all Integration option are available in Salesforce?

  • What is WSDL?

  • What is SoapUI?

  • What is difference between Enterprise WSDL and Partner WSDL?

  • What is an Integration Patterns?

  • Different type of Integration patterns available in Salesforce?

  • What is remote site settings?

  • What is a Connected App?

  • What is OAuth?

  • What are different OAuth2.0 Authorization flows are available in Salesforce?

  • What is JWT flow in Salesforce?

  • What is web service flow in Salesforce?

  • What is Named Credentials and what is the use of it?

  • What is OpenID Connect?

  • Difference between OpenID and OAuth?

  • What is Streaming API? Explain the different mechanism of Steaming API?

  • What is Change Data Capture?

  • What is Tooling API? Provide one example when you used it.

  • What is Salesforce Connect?

  • What are REST API Composite Resources

Top Salesforce Triggers Interview Questions

  • What is Trigger in Salesforce?

  • What are the two types of triggers in Salesforce?

  • What is the use of trigger class in Salesforce?

  • What are different events available in Triggers?

  • When we should use trigger or automation?

  • Best practice and consideration for Trigger?

  • How many times trigger execute on an Upsert event

  • How many times trigger execute on an Merge event

  • Order of execution for Trigger

  • When you will choose before event and when you will chose after event?

  • What is the different between Trigger.New and Trigger.newMap?

  • When we should use Trigger.Old

  • How to void recursion in Trigger.

  • How make callout from Trigger?

  • Can we call a batch job from Trigger?

  • What is Trigger Handler pattern?

  • Have you used any trigger framework in Salesforce?

  • Difference between Validation rules and Triggers?

Top Salesforce Lightning Interview Questions

  • How can we extend any component in aura framework?

  • How can you call one JS controller method from another JS controller method in aura?

  • How do you pass value to the JS controller while using hyperlink?

  • What are the steps to add a lightning component in a vf page?

  • How do you de-activate the paste functionality in lightning input?

  • How to get the current user name and current user profile name in aura component without using apex?

  • Explain data binding in aura

  • Why do we use @AuraEnabled annotation?

  • Is it possible to use the value of another attribute or any custom label as the default value of one attribute in aura component instead of using hardcode?

  • How do we restrict an aura component to be used in the record pages of only for particular Sobjects?

Salesforce Vlocity Interview Questions

  • What is Vlocity?

  • What is Salesforce Industries?

  • What is OmniStudio?

  • What are FlexCards?

  • Naming Conventions for FlexCards?

  • What is an OmniScript?

  • Explain OmniScript Naming Conventions?

  • How to improve the performance of OmniScript?

  • What is the difference between Salesforce Screen flow vs OmniScript?

  • How to deploy OmniStudio component from one sandbox to another sandbox or production?

  • What is Vlocity OmniOut?

  • What is the use of Remote Action?

  • What is a DataRaptor?

  • What is difference between DataRaptor Turbo Extract and DataRaptor Extract?

  • What are Integration Procedures?

  • What are Calculation Procedures?




Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.