Posts

Showing posts with the label Picklist

Dependent Picklist Values in Apex - A Concise Solution

Image
I don't want to read the explanation - just take me to the code ! The Problem Salesforce supports the concept of a "dependent" picklist, that is, a picklist whose values vary based on the state of another field (the "controlling" field).  According to Salesforce Help : A dependent picklist is a custom or multi-select picklist for which the valid values depend on the value of another field, called the controlling field . Controlling fields can be any picklist (with at least one and fewer than 300 values) or checkbox field on the same record. Figure 1 shows a field dependency defined between a controlling picklist field, Control , and the dependent picklist field, Depend .  For each of the possible values of Control (A, B, C, D, E, F, G, H), the columns of the table show in yellow the values of Depend (X, Y, Z) that are valid (or "included"). Figure 1) Field dependency defined between "Control" and "Depend" fields. ...