Flow Action: Get Picklist Values

In my spare time I’m experimentally rebuilding Approval Processes on top of Flow and I recently had a need for a way in Flow to retrieve a set of picklist values that I could then work with. So I built a simple Flow Action to enable all flow designers to do this without code.

It’s a little like the Picklist Choice Set resource in that you hand it the name of an Object and a Field, but it returns a collection of strings that you can then work with directly.

You can iterate through the values but one of the most useful things to do with this is to pass them into the new multiselect dual listbox screen component to let the user pick from among them.

Note: If you’re simply trying to extract the value of a particular picklist field on a record, try https://unofficialsf.com/extract-text-from-email-fields-picklist-fields-and-more-with-the-extracttextfromnontextfield-action/


Provide this action with the api names of your target Object and Field. Field must be a picklist.

Install (Unmanaged Package)

Source Code

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Saul Clavijo
Saul Clavijo
7 months ago

Is there a way to use your Apex Class but with the PIcklist Screen Component?

Mark Mogridge
Mark Mogridge
4 months ago

Thank you very much Alex!

Excellent away around the limitations of search-free ‘lookups’ in Salesforce.

But I am hitting a problem when I run a mass update (>1 record) using this Flow Action…

GETPICKLISTVALUES (APEX): SetCountryPicklistValues
objectName = CodeMapping_Meta__mdt
fieldName = Country_ISO_Picklist__c

Error Occurred: The number of results does not match the number of interviews that were executed in a single bulk execution request.

Can you give me some pointers on how to get around this problem please? Thank you!