When updating or creating records in screen flows or autolaunched flows, you have two main choices for determining how the record is set:

  1. Use all values from a record
  2. Use separate resources, and literal values

Admittedly, option 1 takes slightly longer to set up. The advantage is once the creation step executes, the variable’s Id field populates.

When you set Account.Name and the flow progresses past the create step, Account.Id now contains the record id of the newly created record. This means you can use this record in any subsequent step in the flow.

Also, when you create multiple records, you must use a collection. The 1st option becomes even more interesting because of its consistent design. A record variable for single records, and a record variable for collections.

The takeaway
Good design doesn’t always mean taking the shortest route. Clarity and consistency are important factors to consider.

Category:
Salesforce