1

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?

1 Answer 1

3

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.

1
  • I just went through this and as explained, it works only with a different Assignment element.
    – Maneesh
    Mar 16, 2017 at 16:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .