function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tyler NealTyler Neal 

Flow to Update Record, Create a Record if it doesn't exist already

Hey guys,

I'm looking to have a flow that can update a record based on it's name, if that record doesn't already exist, it should create it.

This is what I have so far at a high level, it updates records but won't create new ones.

http://cl.ly/image/3R0I3c2d1e2L

Thanks,
@Karanraj@Karanraj
Tyler - Are you getting any error message for the create new record scenario? Make sure to pass all mandatory field values while creating the record
 
DavidGantDavidGant
Tyler,

My guess is that the criteria on the Store Does Not Exist option is incorrect. My assumption is that you are assigning the Id found in the Lookup step to a variable and then having the Decision step look to see whether the variable is null or not. If that is the case, then you will want to make sure to check the Assign null values to the variable(s) if no records found checkbox on the Lookup step. Hopefully this solves the issue. If not, would you mind sharing the criteria you are using?