This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
The Bulk Actions Framework provides a configurable solution for executing standardized actions on multiple Salesforce records simultaneously. This framework streamlines the development and deployment of bulk operations such as field updates, task creation, and email sending.
- Efficiency: Reduces development time for implementing bulk actions.
- Standardization: Provides a unified and configurable framework.
- Flexibility: Supports custom evaluation criteria, input flows, and action flows.
The framework utilizes a combination of a generic "screen" flow and a Lightning Web Component (LWC). The process is as follows:
- Initiation: A user triggers a bulk action via a list view button, selecting target records.
- Configuration: A generic screen flow is invoked, referencing a specific custom metadata configuration.
- Evaluation (Optional): An evaluation flow filters records based on defined criteria.
- Input (Optional): An input flow gathers additional user input.
- Execution: An action flow performs the defined operation on the filtered records.
- Reporting: A results screen displays the outcome of the bulk action, including successes and errors.
- Installation: Install the Bulk Actions Framework package into your Salesforce org.
- Flow Development: Implement custom evaluation, input, and action flows to handle specific business logic.
- Configuration: Define bulk action configurations using custom metadata, specifying associated flows and preview fields.
- Button Setup: Add a list view button to the desired object, linking it to the framework's initializer flow.
The framework leverages three types of flows, all configured via custom metadata:
- Purpose: Filters records based on specified conditions.
- Input:
record
(Data type of records in scope) - Output:
isValid
(Boolean): Indicates if the record meets the criteria.outputMessage
(Text, Optional): Additional details or messages.
- Purpose: Collects user input via a screen flow.
- Input: None.
- Output: User-defined variables representing gathered input.
- Purpose: Executes the core action on the filtered records.
- Input:
record
(Data type of records in scope): Records to be processed- Output Variables from Input Flow (if applicable): Variables used by the action flow.
- Output:
errorMessage
(Text, Optional): Error message from flow's fault block.
The framework handles errors via:
- Unhandled Exceptions: Errors not caught within the action flow. These are presented via the
result.getErrors()
output of the action flow. - Handled Exceptions (Faults): Errors handled with a "fault" block in the action flow.
errorMessage
variable is used to surface these types of errors
Both types of errors are displayed on the results screen to the user.
The Bulk Action Setup Wizard simplifies configuration:
- Launch: Access via the bulk action setup launcher.
- New Configuration: Create a new configuration.
- Parameter Input: Enter configuration details through a guided interface.
- Validation: Input is validated for completeness.
- Final Review: A summary screen displays the configuration and outlines the required components to create.