The documentation on invocableMethod
clearly states that you can pass in a list of a sObject type.
There can be at most one input parameter and its data type must be one of the following:
A list of a primitive data type or a list of lists of a primitive data type – the generic Object type is not supported.
A list of an sObject type or a list of lists of an sObject type – the generic sObject type is not supported.
However, in my flow, i only have the option to pass in a sObject variable – there is no option to pass in a sObject collection (I have a sObject collection set to public input / output in the flow).
So how can you pass a list of a sObject type from flow to invocable method? Seems like you can only pass a single sObject.
Best Answer
Found answer on developer boards from Chad Barbour.
Apparently a sObject variable is a list, and a sObject collection is a list of lists. So you need to be able to work with lists of lists and then you will have the option to pass / receive sObject collections. Go figure...