Understanding Automatic Dependency Information for Cascading Fixed-Choice Lists
Assume that you have defined two fixed-choice fields on the
OrderLineItem
objects named FulfillmentCenter
and
FulfillmentWarehouse
. When defining the
FulfillmentWarehouse
field, further assume that you configured it to be
constrained based on the value of the FulfillmentCenter
field.
This combination allows the end-user to first pick a fulfillment center, then to pick an
appropriate fulfillment warehouse related to that choice of fulfillment center. If the
user changes the value of the fulfillment center, then the current value of the
fulfillment warehouse is set to null
to force the end-user to select an
appropriate fulfillment warehouse based on the new value of the constraining
FulfillmentCenter
field. This type of cascading fixed-choice list
dependency is automatically configured when you setup the "constrained by" field as part
of defining the second fixed-choice field. In this example, the
FulfilmentWarehouse
field depends on the
FulfillmentCenter
field.
Next, assume that your application has the requirement to allow configuring the
fulfillment warehouse only for line items with a quantity greater than five. To support
this functionality, you would configure the following conditionally updateable
expression on the FulfillmentWarehouse
field:
Quantity_c > 5
After doing this, the Depends On multi-select list will appear in the
Constraints section so you can configure the fact that your
FulfillmentWarehouse
now also depends on the
Quantity
field. After doing this, when the user changes the value
of the quantity at runtime, this will dynamically affect whether the fulfillment
warehouse field is updateable or not. The figure below shows the process of configuring
the Quantity field as one on which the FulfillmentWarehouse
field now depends. Notice that the Fulfillment Center field appears selected in
the Depends On list, yet is disabled. This is because that dependency is required
for the correct runtime functionality of the constrained fixed-choice fields and so you
are not allowed to remove it.
![Cascading Fixed-Choice Dependencies Cannot Be Removed](images/configure_depends_on_disabled.png)