I have a flow that loops through a few collections and eventually brings me to a point where I have assigned an SObject a set of variables. Then I want to add that SObject to a new collection for fast creating. I have one assignment element that sets all of the variables and then adds the object to the collection. But it seems that my collection is always empty after this happens. What am I doing wrong?
Someone pointed this out to me, but I couldn't find it directly in any questions so I wanted to share.
For some reason you cannot assign variables to an SObject, and add that SObject to a SObject collection in the same Assign element. You need to use two different Assign elements, the first to set the variables, and the second to add to the collection. I'm not sure why this is the case, but it has worked for me.