Overview of Field Dependencies in Salesforce



In Salesforce, field dependencies are the filters that let users alter a picklist’s items based on the value of a different field. It means controlling a field’s value based on the other field. For instance, there are two fields labelled State & Country. When I choose a country, I only want the states associated with that particular country to be displayed. Hence, we have to display all states that are related to Country Field. Likewise, Districts that are related to States. Here one field is dependent on another field. We have to learn about two fields in Field Dependencies. 

They are:

  • Controlling Field
  • dependent Field
  • Custom picklists can be both Controlling and dependent fields. 

Firstly, Controlling Field –   A controlling field is one that determines which values are available in one or more related dependent fields.  Secondly, Dependent Field – A dependent field shows values according to the value chosen. 

  • Custom picklists can be both Controlling and dependent fields. 
  • The standard picklists field can only be used for controlling. 
  • Default values can be set for the controlling field. 
  • Hence, we cannot set default values for the dependent picklist. 
  • Multi Select picklists can be dependent. 
  • Then, controlling fields must be added to page layouts. 
  • In the controlling field, we can add up to 300 values.

 Steps to create a field dependency:

Step 1 – Go to the setup menu and select the object you want to create field dependency. 

Step 2 – Click on the field dependency button & select controlling and dependent fields. See the below screen for reference. 

             

Step 3 – Select dependent fields under controlling fields by pressing the continue button. click Include, and then click Save. for more information, see the screen below. 

           

For more blogs: Click Here