Field Dependency in Salesfroce

Field Dependency in Salesforce:

Field dependency means controlling the field values based on the other field values selected. Basically, it is a filter that allows us to display the content of picklist value based on the value of another field.  For instance, take two fields one is Country and other is State. Now I want to display the value of states based on the value selected for the country.

Points to remember regarding the field dependencies:
  1.  The value selected in the controlling field affects the values available in the dependent field.
  2.  We can define custom picklist fields as controlling or dependent fields whereas standard picklist field can only be defined as controlling fields.
  3.  We can define default values for controlling field whereas for the dependent field we can't define default values.
  4. We cannot define multi-select picklist field as controlling field. 
  5. We can define checkbox field as controlling field only.

Creating field dependency fields in Salesforce Org:

To create a dependency:

-  Go to the setup menu and select the object for which you want to create.
-  Click on field dependencies button.




-  Create new dependencies, select controlling field(i.e Country) and the dependent field(i.e States) . See the below
    screenshots for reference.


     Click on the continue and include the values for the dependent field(States) and then save.



Field Dependencies are created now. To test this, go to the account record and edit country field and a select country as India, once you select the country you will get the only state related to India.







Comments