Tuesday, December 3, 2024

Salesforce flows with examples

 It seems like you're asking about flows with examples, but could you clarify what kind of flows you're referring to? For example:

  1. Process Flows: Steps in a business process, like onboarding an employee.
  2. Data Flows: Movement of data through a system, like ETL (Extract, Transform, Load) processes.
  3. User Flows: The journey a user takes through a website or app, like signing up or making a purchase.
  4. Programming Flows: Logical sequences in code, such as loops, conditions, or state machines.
  5. Workflow Automations: Tools like Zapier, Power Automate, or others used to automate tasks.

Salesforce Flows are powerful tools for automating business processes within Salesforce. They allow admins to configure actions, collect data, and interact with the system without needing extensive coding knowledge.

Here are examples of Salesforce Flow types with real-world scenarios:


1. Record-Triggered Flow

Scenario: Automatically update a related record when an Opportunity is closed.

  • Use Case: Update the Account’s "Last Closed Date" field when an Opportunity is marked as "Closed Won."
  • Flow Steps:
    1. Trigger: When a record is created or updated on the Opportunity object.
    2. Conditions: Opportunity Stage = "Closed Won."
    3. Action: Update the related Account record with the Opportunity’s Close Date.

2. Screen Flow

Scenario: Guide customer service reps through a case escalation process.

  • Use Case: Prompt users to input additional information for a high-priority case.
  • Flow Steps:
    1. Start: Create a button on the Case page to launch the flow.
    2. Screen: Ask for details like the escalation reason and expected resolution date.
    3. Action: Update the Case record with input values and notify the Manager via email.

3. Scheduled-Triggered Flow

Scenario: Send a reminder email for overdue tasks.

  • Use Case: Notify users of open Tasks that are due today or earlier.
  • Flow Steps:
    1. Trigger: Run daily at 8:00 AM.
    2. Get Records: Query open Tasks with a due date before today.
    3. Action: Send an email notification to the assigned user with Task details.

4. Autolaunched Flow (Invocable)

Scenario: Integrate with external systems to validate customer data.

  • Use Case: Validate an email address by sending it to an external API.
  • Flow Steps:
    1. Input Variables: Accept an email address.
    2. Action: Use an HTTP callout to an external API for validation.
    3. Output Variables: Return the validation status (valid or invalid).
    4. Usage: Invoke the flow from Apex or another flow.

5. Loop in Flow

Scenario: Assign open leads equally among users in a sales team.

  • Use Case: Distribute leads using a round-robin method.
  • Flow Steps:
    1. Trigger: A record is created or updated on the Lead object.
    2. Get Records: Retrieve all open Leads.
    3. Loop: Iterate through the list of leads.
    4. Assignment: Assign each Lead to the next available sales user in the round-robin list.
    5. Update Records: Save the updated owner for each Lead.

6. Subflow

Scenario: Use a common subflow for contact verification across multiple flows.

  • Use Case: Validate Contact fields (email and phone) and handle errors.
  • Flow Steps:
    1. Create a reusable subflow to check for valid email and phone numbers.
    2. Integrate the subflow into other flows, like creating a new Lead or updating Account information.

7. Decision Element in Flow

Scenario: Route cases to the appropriate team based on priority and type.

  • Use Case: Automatically assign cases to different teams.
  • Flow Steps:
    1. Trigger: A record is created on the Case object.
    2. Decision: Evaluate conditions:
      • High Priority & Technical Issue → Assign to Tech Support.
      • High Priority & Billing Issue → Assign to Finance.
      • Else → Assign to General Support.
    3. Action: Update the case owner field with the corresponding team queue.

8. Email Alert in Flow

Scenario: Notify the sales team when a large Opportunity is created.

  • Use Case: Send an email to the sales manager if an Opportunity's Amount exceeds $100,000.
  • Flow Steps:
    1. Trigger: A record is created or updated on the Opportunity object.
    2. Condition: Amount > 100,000.
    3. Action: Use the "Send Email" action to notify the manager.

9. Platform Event in Flow

Scenario: Trigger notifications to external systems for large orders.

  • Use Case: Notify an inventory management system about large sales orders.
  • Flow Steps:
    1. Trigger: A record is created on the Order object.
    2. Condition: Order Total > 50,000.
    3. Action: Publish a Platform Event with the order details.

Batch Apex, @future methods, and Queueable Apex in Salesforce, along with example interview questions and answers with scenarios.

 

1. Batch Apex

Batch Apex is used to process large volumes of records asynchronously in Salesforce. It divides the records into batches, processes them separately, and ensures governor limits are handled effectively.

Key Points:

  • Implemented using Database.Batchable interface.
  • Can process up to 50 million records.
  • Divides records into chunks (default 200, customizable).
  • Supports start, execute, and finish methods.

Example:

apex code
global class BatchExample implements Database.Batchable<SObject> {
    global Database.QueryLocator start(Database.BatchableContext bc) {
        return Database.getQueryLocator
('SELECT Id, Name FROM Account WHERE Industry = \'Technology\'');
    }

global void execute(Database.BatchableContext bc, List<Account> scope) {
        for (Account acc : scope) {
            acc.Description = 'Updated by Batch Apex';
        }
        update scope;
    }

    global void finish(Database.BatchableContext bc) {
        System.debug('Batch Apex Processing Completed');
    }
}

2. @future Methods

@future methods are used to perform operations asynchronously, typically when an operation is resource-intensive or must avoid affecting user interaction.

Key Points:

  • Marked with the @future annotation.
  • Methods must be static and return void.
  • Cannot accept SObject or collection of SObject as arguments.
  • Use when the operation does not require an immediate response.

Example:

apex code
public class FutureExample {
    @future
 public static void updateContactEmails(Set<Id> contactIds) {
  List<Contact> contacts = 
  [SELECT Id, Email FROM Contact WHERE Id IN :contactIds];
    for (Contact contact : contacts) {
        contact.Email = 'updated@example.com';
        }
        update contacts;
    }
}

3. Queueable Apex

Queueable Apex is similar to @future methods but with more control and flexibility. It supports complex data types and chaining jobs.

Key Points:

  • Implements the Queueable interface.
  • Allows you to chain jobs.
  • Supports job monitoring through the AsyncApexJob table.
  • Useful for scenarios where @future is insufficient.

Example:

apex code

public class QueueableExample implements Queueable {

    private List<Id> accountIds;

    public QueueableExample(List<Id> accountIds) {

        this.accountIds = accountIds;

    }

public void execute(QueueableContext context) {

   List<Account> accounts = 

   [SELECT Id, Name FROM Account WHERE Id IN :accountIds];

        for (Account acc : accounts) {

        acc.Description = 'Updated by Queueable Apex';

        }

        update accounts;

    }

}

Interview Questions and Answers

Batch Apex

  1. Q: Why would you use Batch Apex over a normal for loop?
    A: Batch Apex is designed to handle large data volumes while respecting Salesforce governor limits by processing records in manageable chunks.

  2. Q: How do you monitor Batch Apex?
    A: You can monitor Batch Apex jobs using the Apex Jobs page in Setup or querying the AsyncApexJob table.

  3. Scenario:
    You have 10 million records in your system and need to apply a discount to customers based on certain criteria. How would you approach it?
    Answer:

    • Use Batch Apex to query the customers in manageable chunks.
    • Apply the discount logic in the execute method.
    • Commit updates to the database after processing each chunk.

@future Method

  1. Q: What are the limitations of @future methods?
    A:

    • Cannot return values.
    • Limited to 50 calls per transaction.
    • Cannot pass SObject types or collections of SObject types directly.
  2. Q: Can @future methods be chained?
    A: No, @future methods cannot be chained. For chaining, use Queueable Apex.

  3. Scenario:
    A user updates an Account, and you need to update all related Contacts asynchronously. How would you achieve this?
    Answer:

    • Use an @future method to pass the Account ID.
    • Query the related Contacts and update their fields in the @future method.

Queueable Apex

  1. Q: What is the main advantage of Queueable Apex over @future methods?
    A:

    • Supports complex data types.
    • Allows job chaining.
    • Provides job tracking via the AsyncApexJob table.
  2. Q: How do you chain Queueable jobs?
    A:

    • In the execute method of one Queueable class, enqueue another Queueable job using System.enqueueJob(new AnotherQueueableClass()).
  3. Scenario:
    You need to process records in two steps: first update records, then notify users via email. How would you achieve this?
    Answer:

    • Create two Queueable Apex classes: one for updating records and another for sending emails.
    • Chain the second job from the first using System.enqueueJob() in the execute method.

Salesforce Apex Trigger interview questions with answers and including scenario-based questions.

 Salesforce Apex Trigger interview questions with answers, including scenario-based questions. These questions are categorized into beginner, intermediate, and advanced levels.

Beginner-Level Questions

1. What is an Apex Trigger?

  • Answer:
    An Apex Trigger is a piece of code executed before or after certain database events like INSERT, UPDATE, DELETE, or UNDELETE on Salesforce records. Triggers allow custom actions to occur when a record is manipulated.

2. What are the types of triggers in Salesforce?

  • Answer:
    • Before Triggers: Execute before a record is saved to the database. Used for validation or setting default values.
    • After Triggers: Execute after a record is saved to the database. Used for actions like sending emails or calling external APIs.

3. What are Trigger Context Variables?

  • Answer:
    Trigger context variables provide runtime information about the trigger's execution. Common variables include:
    • Trigger.new: Contains new versions of the records being modified.
    • Trigger.old: Contains old versions of the records (for UPDATE or DELETE).
    • Trigger.isInsert, Trigger.isUpdate, Trigger.isDelete, etc.: Boolean flags for trigger operations.

4. What are Governor Limits in Salesforce?

  • Answer:
    Salesforce imposes limits to ensure efficient use of resources. Examples include:
    • SOQL Queries: 100 per transaction.
    • DML Statements: 150 per transaction.
    • Heap Size: 6 MB (synchronous) / 12 MB (asynchronous).

Intermediate-Level Questions

5. Can you invoke a trigger on a custom object?

  • Answer:
    Yes, triggers can be created on custom objects. The syntax is the same as for standard objects, e.g.,
    apexcode
    trigger CustomObjectTrigger on CustomObject__c (before insert, after insert) { // Code logic here }

6. How do you prevent recursive trigger execution?

  • Answer:
    Recursive triggers can be controlled using a static Boolean variable in an Apex class:
    apex code
    public class TriggerHelper { public static Boolean isTriggerExecuted = false; } trigger AccountTrigger on Account (before insert) { if (!TriggerHelper.isTriggerExecuted) { TriggerHelper.isTriggerExecuted = true; // Trigger logic } }

7. What is the difference between Trigger.new and Trigger.old?

  • Answer:
    • Trigger.new: Contains the new version of records being inserted/updated. It’s available in INSERT and UPDATE triggers.
    • Trigger.old: Contains the old version of records. It’s available in UPDATE and DELETE triggers.

8. Scenario: Write a trigger to prevent deletion of an Account if it has related Contacts.

  • Answer:
    apex code
    trigger PreventAccountDeletion on Account (before delete) { for (Account acc : Trigger.old) { if ([SELECT COUNT() FROM Contact WHERE AccountId = :acc.Id] > 0) { acc.addError('Cannot delete account with related contacts.'); } } }

9. What is the purpose of the addError method in triggers?

  • Answer:
    The addError method prevents DML operations on a record and displays a custom error message. It’s used for validations and ensuring data integrity.

Advanced-Level Questions

10. How do you bulkify a trigger?

  • Answer:
    Bulkification ensures triggers handle multiple records efficiently. For example:
    • Avoid SOQL or DML statements inside loops.
    • Use collections like List or Map for batch processing. Example:
    apex code trigger UpdateOpportunities on Account (after update) { Set<Id> accountIds = new Set<Id>(); for (Account acc : Trigger.new) { accountIds.add(acc.Id); } List<Opportunity> opportunities = [SELECT Id, AccountId FROM Opportunity WHERE AccountId IN :accountIds]; for (Opportunity opp : opportunities) { opp.StageName = 'Updated'; } update opportunities; }

11. Scenario: Create a trigger to automatically update an Opportunity's StageName to "Closed Won" when the related Account's Type is changed to "Customer".

  • Answer:
    apex code trigger UpdateOpportunitiesOnAccountChange on Account (after update) { Set<Id> accountIds = new Set<Id>(); for (Account acc : Trigger.new) { if (acc.Type == 'Customer' && acc.Type != Trigger.oldMap.get(acc.Id).Type) { accountIds.add(acc.Id); } } if (!accountIds.isEmpty()) { List<Opportunity> oppsToUpdate = [SELECT Id, StageName FROM Opportunity WHERE AccountId IN :accountIds]; for (Opportunity opp : oppsToUpdate) { opp.StageName = 'Closed Won'; } update oppsToUpdate; } }

12. What are the limitations of Apex Triggers?

  • Answer:
    • Cannot make direct callouts to external services.
    • Subject to governor limits (SOQL, DML, CPU time, etc.).
    • Cannot run asynchronously.

13. Scenario: Write a trigger to calculate and update a custom field Total_Contacts__c on Account whenever a Contact is added, updated, or deleted.

  • Answer:
    apex code trigger UpdateContactCount on Contact (after insert, after update, after delete, after undelete) { Set<Id> accountIds = new Set<Id>(); if (Trigger.isInsert || Trigger.isUpdate || Trigger.isUndelete) { for (Contact con : Trigger.new) { accountIds.add(con.AccountId); } } if (Trigger.isDelete) { for (Contact con : Trigger.old) { accountIds.add(con.AccountId); } } if (!accountIds.isEmpty()) { List<Account> accountsToUpdate = [SELECT Id, Total_Contacts__c, (SELECT Id FROM Contacts) FROM Account WHERE Id IN :accountIds]; for (Account acc : accountsToUpdate) { acc.Total_Contacts__c = acc.Contacts.size(); } update accountsToUpdate; } }

14. Scenario: How would you design a trigger framework for large-scale Salesforce implementations?

  • Answer:
    A trigger framework organizes triggers to follow best practices. Key elements include:

    • Handler Class: Use a separate class to handle logic.
    • One Trigger per Object: Avoid multiple triggers on the same object.
    • Trigger Context Handling: Manage before and after contexts separately.

    Example:

    public class AccountTriggerHandler { public static void handleBeforeInsert (List<Account> newAccounts) { // Logic here } public static void handleAfterUpdate (Map<Id, Account> oldMap, List<Account> updatedAccounts) { // Logic here } } trigger AccountTrigger on Account (before insert, after update) { if (Trigger.isBefore && Trigger.isInsert) { AccountTriggerHandler.handleBeforeInsert(Trigger.new); } else if (Trigger.isAfter && Trigger.isUpdate) { AccountTriggerHandler.handleAfterUpdate(Trigger.oldMap, Trigger.new); } }

MuleSoft interview questions along with their answers

 

Beginner-Level Questions

1. What is MuleSoft, and what are its key features?

  • Answer:
    MuleSoft is an integration platform that enables developers to connect applications, data, and devices across various environments (on-premises, cloud, or hybrid).
    Key features include:
    • API-led connectivity: Allows building APIs in a structured approach.
    • Anypoint Platform: Unified platform for API design, deployment, and management.
    • Pre-built connectors: Simplifies integration with popular applications and services.
    • Scalability: Supports horizontal scaling for large-scale integrations.
    • DataWeave: Powerful language for data transformation.

2. What is Mule, and how does it work?

  • Answer:
    Mule is a lightweight Enterprise Service Bus (ESB) and integration framework. It allows developers to:
    • Connect different systems or services using connectors and endpoints.
    • Route and transform data using flows.
    • Utilize message processors for seamless communication.

3. What are the main components of the MuleSoft Anypoint Platform?

  • Answer:
    • Design Center: For designing APIs and integrations.
    • Exchange: A marketplace for reusable connectors, APIs, and templates.
    • Runtime Manager: For deploying, managing, and monitoring applications.
    • API Manager: For managing API policies and SLAs.
    • Anypoint Studio: An IDE for building and testing Mule applications.

Intermediate-Level Questions

4. What is a Flow in Mule?

  • Answer:
    A flow is a sequence of steps in a Mule application that define how messages are received, processed, and routed. Flows can have:
    • Message Sources (triggers like HTTP Listener or Scheduler).
    • Processors (transformations, loggers, etc.).
    • Endpoints (where messages are sent, like databases or external APIs).

5. What is DataWeave?

  • Answer:
    DataWeave is MuleSoft’s data transformation language used to transform data from one format to another (e.g., JSON to XML). It is powerful and concise, supporting various operations like mapping, filtering, and aggregation.

6. What is the difference between a sub-flow and a private flow?

  • Answer:
    • Sub-flow: Cannot have its own message source. It’s reusable and executes in the same thread as the main flow.
    • Private Flow: Has its own message source and executes in a new thread.

7. Explain the VCore in MuleSoft.

  • Answer:
    VCore represents the computing capacity required to process Mule applications in CloudHub. It’s a unit of processing power used to determine the scalability of MuleSoft apps.

8. How does API Gateway work in MuleSoft?

  • Answer:
    API Gateway acts as a protective layer for APIs by enforcing security policies, rate-limiting, and monitoring traffic. It ensures that APIs are secure and can be accessed according to defined rules.

Advanced-Level Questions

9. What is the difference between MEL (Mule Expression Language) and DataWeave?

  • Answer:
    • MEL: Was used in older Mule versions for simple data transformations and expressions.
    • DataWeave: Introduced in Mule 4 as the primary language for all transformations, replacing MEL. It’s more powerful and modern.

10. How does MuleSoft handle error handling?

  • Answer:
    MuleSoft uses error handling components:
    • On Error Propagate: Re-throws the error to the parent flow.
    • On Error Continue: Handles the error and continues processing.
    • Try Scope: Encapsulates code to handle specific exceptions.

11. What are Persistent Queues in MuleSoft?

  • Answer:
    Persistent queues ensure message reliability by storing messages on disk. They are used in scenarios where durability and guaranteed delivery are critical.

12. Explain Batch Processing in MuleSoft.

  • Answer:
    Batch processing is used to process large data sets in chunks. It involves:
    • Input Phase: Loads data into batches.
    • Process Phase: Processes each record in the batch.
    • On Complete Phase: Finalizes the batch operation.

13. What are some best practices in MuleSoft development?

  • Answer:
    • Use API-led connectivity (Experience, Process, and System APIs).
    • Implement consistent error handling mechanisms.
    • Use DataWeave for all transformations.
    • Leverage Anypoint Exchange for reusable assets.
    • Follow naming conventions for flows, variables, and connectors.

14. What is the difference between Synchronous and Asynchronous Flows in MuleSoft?

  • Answer:
    • Synchronous Flow: Processes messages in a single thread, providing a quicker response.
    • Asynchronous Flow: Processes messages in separate threads, improving throughput for time-consuming tasks.

15. What is API-Led Connectivity?

  • Answer:
    API-led connectivity is an architectural approach to building APIs in three layers:
    • Experience APIs: Tailored for specific applications or user interfaces.
    • Process APIs: Handles orchestration and business logic.
    • System APIs: Interacts directly with backend systems.

Scenario-Based Questions

16. How would you handle real-time and batch data processing in a Mule application?

  • Answer:
    Use:
    • Real-time processing for immediate data needs with HTTP, WebSockets, or JMS.
    • Batch processing for bulk data using the Batch Processing module.

17. Describe a use case for a custom connector.

  • Answer:
    If there’s no pre-built connector for a specific API or service, you can build a custom connector using the Anypoint Connector DevKit to bridge the gap.

Salesforce interview questions with answers and including real-world scenarios

 a curated list of Salesforce interview questions with answers organized by concepts and including real-world scenarios to help demonstrate your problem-solving skills during an interview.

1. General Salesforce Questions

Q1: What is Salesforce, and what are its key features?

Answer:
Salesforce is a cloud-based CRM platform that helps organizations manage customer data, automate workflows, and improve sales, marketing, and service processes.
Key Features:

  • Multi-tenancy
  • Customization (Objects, Fields, Visualforce, Lightning)
  • Automation tools (Workflows, Process Builder, Flows)
  • AI capabilities (Einstein Analytics)
  • Integration APIs (REST, SOAP, Bulk)

Scenario:
Imagine you're asked to implement Salesforce for a retail business. How would it help?

  • Use Sales Cloud to manage leads and opportunities.
  • Use Service Cloud for customer complaints and case tracking.
  • Automate follow-ups for abandoned carts using Marketing Cloud.

2. Salesforce Administration

Q2: What are profiles and permission sets, and how are they used?

Answer:

  • Profiles: Define base-level access to objects, fields, and tabs.
  • Permission Sets: Grant additional access beyond the profile.

Scenario:
A user needs access to create leads but has a profile without this permission. What would you do?

  • Assign a Permission Set with "Create" access on the Lead object to the user instead of modifying the profile.

Q3: How do you handle record access for external users in a Salesforce community?

Answer:

  • Use Sharing Sets to grant access based on the user’s role and related account.
  • Leverage Guest User profiles for public data.

Scenario:
A partner community allows distributors to view only their orders. How do you configure it?

  • Create a Sharing Rule that shares orders where the Account matches the distributor’s account.

3. Salesforce Automation

Q4: What are the differences between Workflow Rules, Process Builder, and Flows?

Answer:

  • Workflow Rules: Trigger simple field updates, tasks, and email alerts.
  • Process Builder: Can handle multiple criteria and invoke Flows or Apex.
  • Flows: Automate complex processes with user interactions and integrations.

Scenario:
You need to send a reminder email to customers 3 days before their subscription expires.

  • Use a Scheduled Flow to evaluate the expiration date and send an email alert.

4. Data Management

Q5: What are the different types of Salesforce relationships?

Answer:

  • Lookup Relationship: Links two objects without dependency.
  • Master-Detail Relationship: Links two objects with dependency; child records are deleted if the parent is deleted.
  • Many-to-Many Relationship: Implemented using a junction object.

Scenario:
A travel agency needs to track trips booked by customers and the destinations they visit. How would you model this?

  • Use a Many-to-Many Relationship:
    • Create a junction object (e.g., “Trip Booking”) to link Customers and Destinations.

Q6: How do you handle data migration in Salesforce?

Answer:

  • Use Data Loader or Import Wizard for bulk data.
  • Ensure proper mapping, and clean data before import.
  • Perform validations and backup data before starting migration.

Scenario:
A company migrates from another CRM to Salesforce. How do you ensure smooth migration?

  1. Identify key objects (e.g., Accounts, Contacts).
  2. Export data from the old system, clean it, and format it for Salesforce.
  3. Use Data Loader to insert records while maintaining relationships using IDs.

5. Salesforce Development

Q7: What are Governor Limits in Salesforce, and why are they important?

Answer:
Governor Limits enforce resource usage rules in Salesforce's multi-tenant environment to ensure fair use for all tenants.

Examples:

  • SOQL query rows limit: 50,000
  • Apex DML operations per transaction: 150

Scenario:
You’re writing an Apex class that retrieves 60,000 records. How do you handle the limit?

  • Use Batch Apex to process records in chunks of up to 2,000.

Q8: What is a Trigger, and how do you avoid recursion?

Answer:
A Trigger is an Apex script executed before or after DML operations (e.g., before insert, after update).

To avoid recursion, use a static Boolean variable to track whether the trigger has already executed.

Scenario:
When updating an account, all related contacts must also update their status. How do you implement this?

  • Write an after update trigger on the Account object to update related contacts while using a static variable to prevent multiple executions.

6. Integration

Q9: What are the different Salesforce APIs?

Answer:

  • REST API: Lightweight, uses JSON, great for mobile apps.
  • SOAP API: XML-based, used for complex integrations.
  • Bulk API: For handling large volumes of data.
  • Streaming API: For real-time notifications.

Scenario:
A financial app needs real-time updates when Salesforce Opportunities are closed. How would you integrate?

  • Use the Streaming API to push Opportunity updates to the financial app.

Q10: What is a Change Set, and how do you deploy it?

Answer:
A Change Set is a tool to deploy metadata between Salesforce environments.
Steps:

  1. Create an outbound Change Set in the source environment.
  2. Add components like objects, fields, and workflows.
  3. Upload and validate the Change Set in the target environment.

Scenario:
You need to deploy a custom object and its fields from Sandbox to Production.

  • Add the custom object and related fields to a Change Set. Test the deployment in a Staging environment before final deployment.

7. Advanced Topics

Q11: What is Salesforce DX, and how does it improve development?

Answer:
Salesforce DX is a modern development model for version control, collaborative development, and CI/CD pipelines. It uses Scratch Orgs, Salesforce CLI, and Source Tracking.

Scenario:
A team is working on a new app. How do you ensure collaborative development without overwriting each other's changes?

  • Use Salesforce DX and Git for version control. Developers can work in isolated Scratch Orgs and merge changes into a shared repository.

Q12: How do you troubleshoot a performance issue in Salesforce?

Answer:

  1. Identify slow queries using Debug Logs or Query Plans.
  2. Optimize SOQL queries by indexing fields.
  3. Reduce automation conflicts (e.g., multiple triggers on the same object).
  4. Archive old data using Big Objects or external storage.

Scenario:
A dashboard is loading slowly. What steps do you take to resolve it?

  • Check the underlying reports and optimize filters or reduce the number of rows returned.

8. Behavioral Questions

Q13: Tell me about a challenging Salesforce project you worked on.

Example Answer:

  • Project: Implementing a Partner Community for a manufacturing company.
  • Challenge: Complex data sharing rules for partners with overlapping territories.
  • Solution: Used Sharing Rules and Account Teams to control access. Created custom LWCs for order tracking.