---
schema_version: "1"
id: a61453c56c586181ed5e48203792cfc8fac1f495905e42fb3f10cdb7140a6727
title: Create Records Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_data_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_data_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 0789d26861edf5103a4e9b494cb0481408553eee31ac107042a6819264d8b3cc
description: Create or update multiple Salesforce or Marketing Object records by using a record collection variable. Create or update exactly one Salesforce or Marketing Object record by using a record variable or other values from the flow.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Create Records Element

Create or update multiple Salesforce or Marketing Object records by using a record collection variable. Create or update exactly one Salesforce or Marketing Object record by using a record variable or other values from the flow.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

How many records you choose to create or update and how to set the field values determine what to enter in the rest of the Create Records element.

This video explains how to use data elements to create, update, and delete records using a flow.

View this [video](https://play.vidyard.com/SiwVdqZ79irAgg2WUJiPob) in a separate tab.

## To create a collection of records

To create multiple records, you must use the values from a record collection variable. Earlier in the flow, populate the record collection variable with the new records’ field values. Make sure the ID field is blank.

To dynamically create some records and update others in a collection, enable **Update Existing Records**. Choose a field on the records in the record collection variable that uniquely identifies each record. The flow uses this field to check whether the records exist. Choose how to process the remaining records if the flow fails to create or update a record.

When you use a record collection variable to create or update multiple records at once, you reduce the number of DML requests in your flow. That means you’re more likely to stay within your org’s limits. For more information, see [Flow Bulkification in Transactions](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_bulkification.htm&release=264.0.0&type=5 "When a flow runs for multiple records at the same time, Salesforce creates one flow interview per record. Bulkification groups similar operations when interviews for the same flow reach the same element, helping the transaction use fewer queries and statements.").

## To create a single record

If you’ve populated a record variable with the field values for the new record, choose to set the record fields by using all the values from a record variable. Then select the record variable to use. Make sure the ID field is blank.

To dynamically create or update a record, enable **Update Existing Records**. Choose a field on the record in the record variable that uniquely identifies the record. The flow uses this field to check whether the record exists.

To manually map values from various resources in the flow, choose to set the record fields by using separate variables, resources, and literal values. Choose the object that you want to create a record for, and set the field values for the record. Optionally, store the ID of the created record in a Text variable if you manually created the variable. For example, when you need the record’s ID to create child records or to provide a link to the created record.

To dynamically check for a duplicate record to update or create, enable **Check for Matching Records**.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example A user enters a name and address into the flow. Verify that a matching user exists by using the Get Records element. If a matching contact doesn’t exist, create a record for that user by using the Create Records element.

## Usage

To prevent the flow from failing, make sure that:

- All required fields are populated with values. The Create Records element populates potentially required fields for you. The fields shown are required in the master record type. For custom objects, confirm the required fields in the object definition.
- For record variables the ID field values are blank. The flow populates the ID fields after the record is created.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note The record isn’t created until the interview’s transaction is completed. Transactions are complete when the interview either finishes or runs a Screen, Local Action, or Wait element.

## Considerations

- If a Create Records element uses a record collection, doesn’t have a fault path, and the flow fails, no records are created, and the flow stops, generating an error.
- If a Create Records element uses a record collection and has a fault path, only the successful records are created. The IDs of the successful records aren’t populated for the records in the record collection in the flow. The IDs are populated on the records in the org.
- The Create Records element can’t update matching records that are locked for editing. If Flow Builder finds a matching record and attempts to update a field in the record, a warning appears.
- The Create Records element can’t update read-only fields in matching records. If Flow Builder finds a matching record and attempts to update a field that's always read only or that you don’t have permission to update, a warning appears.
- The Create Records element can’t update fields in matching records for objects that don’t support the update function. If Flow Builder finds a matching record and attempts to update a field in an object that doesn’t support the update function, an error appears, and you can’t activate the flow. To determine whether an object can be updated, see _Object Reference for the Salesforce Platform_.
- If your org has the **Set Audit Fields upon Record Creation** user permission enabled in Setup, flows that use Create Records elements to clone records can copy system audit fields from the source record to the new record. The system fields include: `CreatedDate`, `CreatedById`, `LastModifiedDate`, and `LastModifiedById`. To learn more, see [Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions](https://help.salesforce.com/s/articleView?id=000386699&type=1&language=en_US).

- **[Check for Duplicate Records](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_data_create_check_for_duplicate_records.htm&release=264.0.0&type=5)**  
    To prevent duplicate records, check for records that match a set of criteria and specify what happens if the flow finds matching records. Some field-level configurations and validations in your org override the settings in the Create Records element.

#### See Also

- [Flow Operators in Data Elements and Record Choice Sets](https://help.salesforce.com/s/articleView?id=platform.flow_ref_operators_filter.htm&release=264.0.0&type=5 "Filter conditions narrow the scope of records that the flow operates on. For example, use filter conditions to update only the contacts that are associated with the Acme Wireless account. When you add an Update Records element, use filter conditions to narrow the scope to just the contacts whose parent account is Acme Wireless. The In and Not In operators are available only in Create Records, Get Records, and Update Records elements.")
- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")
- [Move and Connect Elements to Change a Flow Route](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_route_add.htm&release=264.0.0&type=5 "Identify which elements the flow runs and in what order by connecting the elements on your canvas together. To change the run order, move elements and add or remove connectors.")
- [Flow Elements](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements.htm&release=264.0.0&type=5 "An element represents an action that the flow can run. Examples include reading or writing Salesforce data, displaying information and collecting data from flow users, runnning business logic, or manipulating data.")