Hi folks, in this post I’m going to discuss how to create records using CREATE RECORD element in Salesforce flows.
Before we start with the topic, if you are new to Salesforce and want to know more about Salesforce flows and flow builders you can check out What is Salesforce Flow Builder and basic Building Blocks of Flow Builder
In this example, we are going to use a Screen flow to create records.
Drag the Screen element to the canvas which will present the user with a screen to insert data from their end.
The screen element is used to collect information from the user and is only available in a screen flow.
As you can see above using the screen element we are creating an Account record having an Account Name field.
We can customize the footer and header section of the screen element using the options available in the screen properties section under configure header and configure footer drop-down.
Now to create the record we will drag the CREATE RECORD element to the canvas.
Once you drag the CREATE RECORDS element from the toolbox, you need to add details like Label, API Name(automatically populated), Description, and object name.
Note – It is a best practice to give your flow elements a description for more clarity for future users.
Learn Salesforce flow with free video tutorials
After selecting the object on which you want to create the record, we need to map the data provided by the user with the object fields.
While editing the CREATE RECORDS element we have an option to select whether we want to create a single record or multiple records using this flow.
As we are getting the Account Name field’s value from the user we are going to select the Use separate resources, and literal values option to map the fields.
Select the Account object and set the field values.
Once the user will enter the Account Name using screen flow, we need to map these data along with the Account object’s record.
For more details about CREATE RECORDS element check out the video