This is week three of the eight-part series, and we will be looking at Creating Records. So far, we've looked at creating a New Record-Triggered Flow, Making Decisions and, Updating Records. If you're finding this series helpful, please subscribe to this blog site and my YouTube channel, and follow me on my social media channels (LinkedIn, Twitter, and Facebook). Okay, let's get to learning.
For our example, we'll create a Task record from an Account record. In Process Builder, the Action screen would look like the image to the left. You choose the Create a Record Action Type, give it a Name, and identity the Record Type or object you want to create a record for.
Flow uses the Create Record element. The Create Record is only available in the After Record Trigger Flow. Remember the before or after rule? If we're working with a record that is not the one the triggered the flow, then we typically use the After Trigger.
Like many things in Flow, we have greater capabilities than we had with Process Builder. Creating records is no exception. Flow allows us to create one or more records if we choose. Let's walk through the options:
In some way, defining the field values is actually easier in Flow. Flow eliminates the Type field we have in Process Builder. This is because all the values in Flow are defined when they are created. For example, if I need to use a formula to set a field value, I will create a Formula variable, store my formula in it, and simply use it whenever I need it. Remember a variable is just a place to store a value. They are nothing to be afraid of. Go back to the Updating Records post for a simple where to think of variables, if you need to.
When you compare the two screens, you can see they are quite similar. In Flow, you select the field on the left column and the value you want to set it to in the right column.
Just a couple of notes about the field Values:
Save your Create Records element once you're done.
Remember to Save the Flow and Activate it when you're ready to test it out. It's that simple so give it a try.
Next week, we'll look at how to use Email Alerts. In the meantime, open up a sandbox and begin experimenting with Record-Triggered Flows.