Loading
Prepare for Email to Become the Default Login ExperienceRead More
Automate Your Business Processes with Salesforce Flow
Working with Data in a Flow

Working with Data in a Flow

The real power of a flow is that it can automate updates to your data, whether the data lives inside your Salesforce org or in an external database. In a flow, you can look up values from records, connect to external systems, create records, update records, and delete records.

Required Editions

View supported editions.

Where to Start

Work through these topics to build a solid foundation for data operations in flows, or jump to the stage that matches what you're building.

Stage Topic What You Learn
1. Create Records Creating a Salesforce Record from a Flow Choose between the Create Records element and a Quick Action element of type Create. Understand how they differ in field availability, required field indicators, and whether the created record's ID is stored for later use.
2. Validate Required Fields Creating Records with Required Field Validation Example Follow a complete example of a screen flow that identifies required fields, collects them from users, and handles errors so that records are created without REQUIRED_FIELD_MISSING failures.
3. Update Records Update Salesforce Records from a Flow Update one record or many. Compare the two Update Records element options and Quick Action to choose the right approach based on how your flow identifies records and supplies new field values.
4. Clone Records Clone Records with a Create Records Element Use a parent-child flow pattern to duplicate a record along with all of its field values, including fields that a standard Get Records element wouldn't retain.
5. Get Related Records Get Related Salesforce Records from a Flow (Beta) Retrieve a parent record and its related child records in a single Get Records element, instead of chaining multiple elements together.
6. Aggregate Collections Sum or Count Items in Collections with the Transform Element Use the Transform element to calculate a total or count from a collection's field values, and assign the result to a target variable—no custom code required.
7. Join Collections Join Collections in a Flow Combine two related source collections into one target collection using join keys in the Transform element, for example to merge order data from an external system with Salesforce records.
8. Optimize for Scale Bulkified Record Processing to Avoid CPU Limits Example See a before-and-after comparison that shows why performing DML inside a loop causes APEX_CPU_TIME_LIMIT_EXCEEDED errors, and how to refactor the flow to collect records during the loop and perform a single DML operation after it completes.

IN THIS SECTION

 
Loading
Salesforce Help | Article