0% found this document useful (0 votes)
16 views3 pages

Create Record Elements

Uploaded by

Sai Teja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Create Record Elements

Uploaded by

Sai Teja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

13)Data Element (create)

What is "Create Records" in Salesforce Flows?


In Salesforce Flows, the "Create Records" element is used to create new
records in Salesforce, like Accounts, Contacts, Cases, or any custom object
records. It's one of the most commonly used actions in a Flow.

How It Works
1. Purpose: It allows you to add new records to Salesforce without writing
code.

2. Where It Fits: You can use it in screen flows, record-triggered flows, or any
type of Flow to automate record creation.

3. Inputs:

You provide the values for the fields of the new record.

You can enter these values manually, pull them from variables, or
dynamically calculate them during the Flow.

Key Features
Single Record: Create one record at a time by setting field values directly.

Multiple Records: Use a record collection variable to create many records


at once (bulk creation).

Auto-generated ID: Salesforce automatically generates a unique ID for


each new record.

13)Data Element (create) 1


Create Multiple Records in Salesforce Flow
Creating multiple records in a Flow involves using a Record Collection Variable
to store and insert multiple records simultaneously. Here's a detailed guide:

To create a single record:


If you have populated a record variable with field values for the new record,
you can set the record fields by using all the values from the record variable.
Simply select the record variable you wish to use, ensuring that the ID field is
left 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 will use this field to check

13)Data Element (create) 2


whether the record already exists.

Here are some key limitations of the Create Records element in


Salesforce Flows:
1. Record Limits: You can only create up to 200 records in a single Flow
execution. If you need to create more than 200 records, consider using a
batch process or breaking the Flow into multiple steps.

2. Field Requirements: If you are creating records for custom objects, the
required fields (such as custom fields marked as "Required" in the object
schema) must be populated in the Flow. If these fields are not populated,
the Flow will fail.

3. Data Types: Certain field data types (like formula fields, auto-number
fields, and read-only fields) cannot be set directly in a Flow. For these
fields, you may need to use default values or let the system handle them.

4. Reference to Parent Records: When creating child records, you need to


ensure that the parent record is either already created or passed into the
Flow with the correct reference (ID). Otherwise, the child record creation
will fail.

5. Bulkification: While Flows are not inherently bulkified, creating records in


large volumes within a Flow can lead to governor limit issues if not
managed properly. Use the Loop and Assignment elements to manage bulk
record creation efficiently.

6. Error Handling: Flows do not have native error handling for record creation
failures. You would need to set up decision elements or custom logic to
handle errors when a record fails to create.

13)Data Element (create) 3

You might also like