4

I'm creating a visual workflow and trying to add a dynamic dropdown. Through a loop that looks up records in one field based on parameters passed in the URL, I've saved the values into a collection variable. But I'm having trouble using that collection as my dropdown choices.

Looking at the three choice options:

  1. Choice - Doesn't take collections at all
  2. Dynamic Record Choice - Looks up on a sObj. The problem with this is, my list has pulled from multiple sObj
  3. Picklist Choice - Same as Dynamic Record choice; looks up to a single sObj.

All I want to be able to do is to create a list of choices from a collection. Is this not possible?

Thank you!

NOTE: This seems to be a duplicate of Collection Variable as Dynamic Choices/Choices in Visual Workflow, except there is no answer there either.

1

One workaround is to write to a temp holding object so you create records, query and use in dynamic choice, and then delete when done. A lot of lifting for what could be a much lighter solution if it was possible to use collection directly in choice / dynamic choice.

  • Also note that I beleive its not possible to directly use collection. If someone knows a way I would love to see it! – gorav Nov 29 '15 at 19:48
  • Totally Agree! I'm not certain that this visual workflow is easier to use rather than learning apex! – ZAR Nov 29 '15 at 19:55
  • You don't have to write test classes! It's a good point. Pushing flows to their limits may point at moving to code, but you can do some pretty cool stuff relatively easily. But relying on anything that is built in flash makes me think twice. That said you can combine apex plugins w flows so that the logic is handled by apex but could prob just go all in at that point. – gorav Nov 29 '15 at 20:48
  • What is a good use case of using a mixture of visual flow and apex? I find that everything you do in visual flow can more easily be done in straight code. The only reason to try to use visual flow is if you want non technical users to be able to edit the flows. Once you add code to a flow, you introduce the requirement of a developer. Is there a good use case of using both together? – ZAR Nov 29 '15 at 20:52
  • If you are a strong coder then I think that balance would be heavily tilted to code. One place I've seen combined is where you want a flow w screens to do something in system mode, BC user doesn't have access to it. Also Keir Bowden explores some use cases here. bobbuzzard.blogspot.com/2015/02/…. I find flows easier primarily bc i am not a good coder. – gorav Nov 29 '15 at 20:59

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.