Field Dependencies in Salesforce are the filters that allow user to change the contents of a picklist based on the value of another field.
Example :- Here there are two field called Country and State. We have to display all states that are related to Country Field. Like wise Districts that are related to States. Here one field is dependent on another field.
In Field Dependencies, we have to learn about two fields they are
- Controlling Field.
- Dependent field.
Controlling Field :- A controlling field is that which controls the available values in one or more corresponding dependent field.
Dependent Field :- A dependent field displays values based on the value selected.
- Custom picklists can be both Controlling and dependent field.
- Standard picklists field can only be used for controlling.
- Default values can be set for controlling field.
- We can not set default values for dependent picklist.
- Multi Select picklists can be dependent.
- Controlling field must be added to page layouts.
- In controlling field we can add up to 300 values.
- Click on Field Dependencies as shown above.
As there are no Field dependencies in the object click on New button.
To includes values double click on the values. We have selected for category Small, Medium and Large. Finally click on Save button.
To check the working of Field Dependencies in Salesforce go to Pharma product object and click on New. Now when creating a record category and sub category field are present.
When we select large as controlling field, In dependent field large1, Large2, Large3 sub category items will be displayed as drop down.