function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Merry SMerry S 

Possible to use multi-picklist selections to create new records from a flow loop?

I have a custom field on a custom object, the field is a multi-picklist of products. What I want is that when someone chooses those products and then saves for it to trigger a flow that creates a new record (on a related custom object) for each product. Is this possible? 

I know I can do this is apex using split(), and I know you can write apex plugins for flows, just wondering if the list that the class would create can be passed back to the flow to create the records? 

I looked at an example of a lead conversion plugin so I have an idea that it might work, but I just cannot wrap my brain around what I am trying to do to understand how to mix the two together - knowing it IS possible will at least get me started. 
 
Best Answer chosen by Merry S
Deepak BalurDeepak Balur
This should be possible using APEX. I am not sure what needs to flow back as you mention but on an AFter INSERT/AFTER UPDATER trigger you will get records created on a related object.

All Answers

Deepak BalurDeepak Balur
This should be possible using APEX. I am not sure what needs to flow back as you mention but on an AFter INSERT/AFTER UPDATER trigger you will get records created on a related object.
This was selected as the best answer
Merry SMerry S
Ahhh.. For whatever reason I never even considered a trigger. That should totally work! Thanks!