Am having huge trouble trying to pass an sObject Collection (of a Custom Object) into and back out of a subflow. PreNote: When I try to save the Master Flow, it always gives an error that the types on the parameter don't match (between Master and Subflow) but they do in every way (it isn't that complicated.) So, it looks like Visual Workflow already has a problem with understanding an sObject Collection parameter even though it allows it when I'm defining the Input and Output.

Problem: When i run the flow, it always crashes if i add anything to the sObject Collection in the Subflow. The debug logs won't record it even though i crank up all levels.

Does anyone know the magic trick to get this to work or do i need to redesign?

Thanks you!

  • Can you share some screenshots on the sObject collection and the output/input setup between the flows? It's not something I've tried yet but the extra information will help anyone else looking as well.
    – Girbot
    Nov 4, 2014 at 22:05
  • I have only had success with standard objects being passed.
    – user12889
    Nov 5, 2014 at 16:23
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation.
    – Keith C
    Nov 5, 2014 at 16:44
  • Any help/advice is very appreciated...i'm trying to figure out whether to give up on this working or not.
    – Cindy
    Nov 5, 2014 at 18:20

2 Answers 2


Thanks for sharing. I can't help you fix the error but I can back you up, from a slightly different perspective. Maybe this will help The Powers That Be to identify the issue and find a fix...

I get the same error message trying to pass an sObject Variable (as opposed to an sObject Collection Variable in your case) to and from a sub flow.

Steps to reproduce: (Winter '15)

  1. Create a new flow. Call it "TestSubFlow"
  2. Within the Flow create an sObject Variable for a custom object, call it "oTest". Make it "Input and Output".
  3. Create an assignment element, which assigns any new value to any field on the sObject. (e.g. "YourBooleanField__c = True"). Make this the start element of your flow.
  4. That's all for the subflow. Save it. 5 Save As a new flow. Call it "TestParentFlow". Refresh your browser.
  5. Delete the assignment element from your TestParentFlow, and create a subflow element instead, by dragging "TestSubFlow" from the "Flows" section of the "Palette" in the sidebar. In this element, add "oTest" as an Input and as an Output. (So that you are passing your sObject Variable in to and out of your sub flow). Make this the start element of your flow.
  6. That's all for the parent flow. Save it.
  7. Error! "In the input assignment, the object types for oTest and oTest don't match. Validated against version 1 of the flow"

By taking this approach it's clear that the object types SHOULD match, because the parent flow was simply a clone of the sub flow.

Regards, Stephen

  • So, it looks like sObject "parameter" passing doesn't work for sObject or sObject Collections. SF claims to be working on this (i started a case). I"ll post their response if i get anything. They said it would be latest last Friday but no response yet. Keeping my fingers crossed.
    – Cindy
    Nov 17, 2014 at 18:34

Ok...i skimmed it down as much as possible.

1) Here is the main flow. In the 1st step, i just assigned values to fields in the "sObject oneIncomeObject". The 2nd step is where i assign the oneIncomeObject to the AllIncomes collection. The 3rd step is calling the subflow. enter image description here

2) Shows the definition of sObject "oneIncomeObject" - note the object type is income_c enter image description here

3) Shows the definition of sObjectCollection "AllIncomes" - note the object type is income_c enter image description here

4) Shows the Inputs to the SubFlow enter image description here

5) Shows the Outputs to the SubFlow enter image description here

6) Shows the Warning message when i save this flow...don't bother with top ones but look at last 2. They say the types don't match...you will see that they DO in the following images. enter image description here


7) Shows the Subflow enter image description here

8) Shows the definition of subflow's sObject "oneIncomeObject" - note the object type is income_c enter image description here

9) Shows the definition of subflow's sObjectCollection "AllIncomesSub" - note the object type is income_c

enter image description here

10) Shows the "crash" error message when the Subflow tries to return enter image description here

I honestly don't think this works. Has anyone had success with this???

  • If I don't try to add another income_c/oneIncomeObject to AllIncomesSub in the Subflow, then there is no crash.
    – Cindy
    Nov 5, 2014 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.