[SalesForce] Creating record in visual work flow for each selected value from a multi select picklist

I have a Screen in my visual work flow containing multi-select picklist with dynamic options (records of another custom object CustomObj1).

And CustomObj2 looks up to CustomObj1 in the data model.

When the user selects the multiple values from the multi-select picklist and hits Next, I want to create record of CustomObj2 for each selected multi-select pick list value.

So for example if the multi-picklist has A, B , C, D (which are records of CustomObj1). The user chose A; C; D. Then when he clicks Next, it would create 3 records of CustomObj2 with lookup to A, C and D.

I know this is easily achievable using a visualforce page and a controller. But can this be done in a visual work flow?

Appreciate your help.

Best Answer

You can try the solution I wrote up here: Visual Workflow - Create multiple records based on dynamic choices

You have to assign the multi-select into a variable and store it on Obj1. It will be a text value with SalesForce IDs in it, separated by semicolons. You then have a trigger run through that string and create a detail record for each one.