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
AJ-ITIAJ-ITI 

Making a Multi-select Picklist the Controller for Field Dependency

 

I know SF doesn't support making a multi-select picklist the controller for field dependency, so I'm looking for a workaround.  The first field (multi-select picklist) will be "State of Interest" (the state(s) the customer is doing business with) and the second field (most likely a regular picklist) will be "Type of Industry". Each state has different specific industry codes/descriptions for "Type of Industry" so we would like to make it dependent upon the state. However, most customers do business with more than one state. I haven't found an answer for this specific setup. Any ideas? Thanks in advance!

 

 

ngabraningabrani

One approach could be to use Javascript to read the value selected by the user for the first multi-picklist. Based upon the values selected in the first picklist, an apex method could initialize the values of second picklist.

 

Another approach could be to ask the user to enter the number of states they do business in.

Based upon this input, we show the state and industry combination multiple times in the next screen of a two-step wizard. As an example, if the user specified that they do business in two states, then we display state picker and industry two times to allow him to select these twice.

AJ-ITIAJ-ITI

Thanks for your response. I'm really not a developer, so I'd need some help with the first option. Not even sure what an apex method is! Wish I knew how to do all that...

 

With the second option, the values in the "industry" field should differ based upon which state they choose. Would this option give me that? If so, please explain how. Thanks so much!

 

Also, I was thinking there might be a way to do this with validation or formulas - any ideas?