2

I have this requirement to create picklists like so :

  1. Destination Zone (~600 picklist values and is a controlling field)

  2. Province (~40 picklist values, dependent on 1)

  3. District (~6000 picklist values, dependent on 2)

  4. City (~200 picklist values, dependent on 3)

and worst part is the business stakeholder would like to add/delete/change the picklist values every 2 weeks or so.

Considerations to take note:

I am aware that a controlling field can have up to 300 values and that if a field is both a controlling field and dependent picklist, it can’t contain more than 300 values (where 1 & 3 is the issue).

I am also aware that maximum picklist value amount is only up to 1k.

Solution workarounds

  1. I heard of approaches of using VF page + Platform Cache to auto complete/suggest as they type but I feel this is way overkill?
  2. LWC.. but unsure if it can handle this amount of permutations?
  3. I also heard of the custom metadata type approach of linking each custom metadata type to each other but updating picklist value changes all the time doesn't seem feasible?
  4. One way I thought of is using a concat of all 4 picklist fields and inputting them as records in a custom object to validate against based on what they select for all 4 picklists but limitation is that user won't be able to know they selected the correct combination.

Have anyone dealt with this before?

3
  • 4
    Seems like picklists themselves may be a poor fit here. Have you considered lookups to a custom data model? More flexible and should be relatively simple to work with. Lookup filters are OOB too.
    – Adrian Larson
    Commented Oct 25, 2022 at 17:44
  • @AdrianLarson I tried setting up just 2 custom objects for the first 2 levels (Destination Zone & Province). Loaded in all the unique values in both objects. If I were to setup all the Lookup Filters the filter criteria will be at least 100 criterias long. I'm sorry this suggestion is not at all feasible
    – compski
    Commented Oct 27, 2022 at 6:26
  • Well, that was just one small piece of the implementation. You had mentioned lwc, so that is a reasonable fallback for the UI side if need be. But there should not be any permutations/combinations involved. You should just be able to do Tier_1__c != Tier_2__r.Tier_1__c.
    – Adrian Larson
    Commented Oct 27, 2022 at 12:02

1 Answer 1

4

A far easier approach for you here may be to instead represent these selections via data. You can create an object for each level, and then lookups to each. You can use Lookup Filters to make sure you are only able to select children which correspond to the parent. I can say from experience that getting this approach to work with LWC will be fairly low effort if you have any dev resources available.

2
  • Ok I created the 1st level into a custom object and loaded all into the Name field. Created the 2nd level into another custom object and loaded into Name field. Extracted the 1st level ids to link to the lookup of the 2nd level. I hope i'm on the right track so far..
    – compski
    Commented Oct 27, 2022 at 3:30
  • Yep that's the approach!
    – Adrian Larson
    Commented Oct 27, 2022 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .