The Record Create element is one I use quite often. But with the addition of Process Builder, I do find that this particular element gets pushed aside in some of the ‘basic’ use cases I had. When you have complex functionality in your Flows around records being created, you’ll be happy you took the time to master the Record Create element.
Where is the Record Create element? You can find the Record Create element under the DATA section of the Palette.
This is the first element that we have had so far that allows you to search all of your Objects! That is because you get can do a Record Create on any Object that shows up (which is just about everything in Salesforce’s back-end). For the purpose of this example, we will create a New Case. So, we want to search and select the Case object. TIP: Type in the Object name to begin to narrow down the list of Objects. There are LOTS of Objects available to you, and scrolling is simply a waste of your time, unless you are exploring the list.
Now that we have chosen the Object that we are going to be creating a record for, we get to choose the Field(s) that we will create on this Object. If you are selecting an Object that requires an Owner, the Running User is the default Owner. If the Object has an Owner, you can upload a QueueId to the OwnerId (and essentially create an Assignment Rule of your own). If you notice, the fields (just like when searching for an Object) are split up by being either Standard or Custom. You can also ‘type’ in the text box to help narrow your fields down and save time.
Now that we have chosen the field we want to update, we get to determine the value or resource that we want it to be set with. Keep in mind, the variable must match type field type. You can’t push a String into a Boolean. In a Record Create situation you have the option to hard code a value here. Hard coding a value is never something I would recommend unless there is no other option around it.
Now that we have set our first field for the new Case record, we can continue to customize the new Case by selecting “Add Row” and adding any additional fields that we need to have on this Case.
Now that we have customized the field(s) of our new record, we have the option to set the new record’s Id as a variable in our Flow. This means you can now reference it throughout your Flow! Think about how cool that is! You will find as you start to build your Flows out, that this ability to reference and build off of records created in Flow is a huge differentiator between Flow and Process Builder.
RECAP: Record Create elements are your ability to create just about any new record in Salesforce from just about any Object, even those hidden ones! Understanding what Objects are available can really help you to figure out how to get creative and solve even more problems! My favorite part of a Record Create is the ability to reference the Id of the record you created in the rest of your Flow. The possibilities are endless!