Timeline for How to parse list of custom Apex types returned from InvocableMethod in Flow
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 5, 2023 at 22:02 | answer | added | cropredy | timeline score: 1 | |
Jan 5, 2023 at 21:27 | comment | added | Phil W | Correct. If you have IDs a, b and c you just need to return an ordered integer list with count(a), count(b) and count(c). | |
Jan 5, 2023 at 18:59 | comment | added | Thomas Taylor |
@cropredy Thanks - so if the Flow engine takes care of matching the right result to the right record based on List order, then I don't need to return the record Id at all if it's not needed by the flow, right? And so could forgo the Apex type altogether and return a List<Integer> as long as I ensure it's in the same order as the input List<Id> ?
|
|
Jan 5, 2023 at 18:47 | comment | added | cropredy |
it is up to you to ensure that the 0th Id in recIds is represented as the 0th FileCount in the invocable results; same for 1st, 2nd, ... The invocable apex logic has to do this. Then SFDC will deliver the results to the correct Flow Interview. If the invocable is supposed to return a collection of values to each flow interview, then you return a list of lists
|
|
Jan 5, 2023 at 18:29 | history | asked | Thomas Taylor | CC BY-SA 4.0 |