Today's Offer - Salesforce Certification Training - Enroll at Flat 10% Off.

- Salesforce Blogs -

What are Field Dependencies? How to create Field Dependency in Salesforce?

There are times when people have to pick something from a drop-down list and he has to keep scrolling to find the relevant values as per his interests and preferences. The reason is that almost everything is included in the list and it is too long to check out. So, the process is not only time consuming but it is stressful too. Here, the concept of field dependencies comes into play where you can refine your search from the drop-down list based on filters.

In this blog for how to create field dependencies in Salesforce, let us first discuss what are field dependencies, a variety of data types to define the field dependency, step by step guide to field dependency creation, How Field dependencies work in the Salesforce etc. Before we go into depth, let us start our discussion with Field dependencies first. Topics to be covered in the blog include –

  1. What are Field Dependencies?
  2. How to create field dependencies in Salesforce?
  3. A list of Data types for Field Dependencies 

What are Field Dependencies?

Field dependencies are the special type of filters that help us to change the content of a picklist based on the value of another field. For example, instead of displaying the all possible options for a country in a single picklist, this is always great to limit the values to display based on the value of other fields like State. This is an excellent style to pick the right option quickly and more conveniently. salesforce Curriculum Another example can be taken for the food items where deciding from the long list is usually time-consuming and boring, you can limit the search by keywords like breakfast, lunch, dinner etc. The values for picklist could be defined as controlling fields and dependent fields as shown below:

Read: Salesforce Service Cloud Tutorial - Facts & Features You Need to Know
  • Controlling Fields – It is able to control the available values in one or more corresponding dependent fields.
  • Dependent Fields – It is able to display the values based on the values selected for the correspondent controlling fields. In the case of above example, the country will be the controlling field and the state will be the dependent field. Controlling field is the checkbox and dependent field is always a picklist.

More considerable facts for dependent fields –

  • The values that are selected for the controlling fields have a direct impact on the dependent field.
  • Both dependent fields and controlling fields work in conjunction to filtration of values.
  • The custom picklists can either be defined as the controlling fields or dependent fields.
  • The standard picklist is usually defined as the controlling fields only and we cannot define then as dependent fields.
  • The default values can be defined for controlling fields only not for the dependent fields.
  • The checkbox can be defined as controlling fields, not the dependent fields.
  • The multi-select picklist can be defined as the dependent fields not controlling fields.

With these important points, you must have a clear idea of controlling fields and the dependent fields and how should you define them.

How to Create Field Dependencies in Salesforce?

First of all, Login to your Salesforce account to create the field dependencies. We are taking the example of healthcare product here and how to create the dependencies for the same.

  • In the first step, go to the Setup -> Build -> Create -> Objects -> Healthcare Product – Create Fields and Relationships -> Field Dependency.
  • From the Field dependency option, Click on New button.
  • As you can see that there are no field dependencies are defined for the healthcare products. Once you click the New option, the following screen will appear in front of you:
  • Here, you have to define the controlling field and dependent field for the healthcare product carefully. So, there is only one category and multiple sub-categories are defined for the same.
  • In the last step, click on the Save option. Congratulation, the field dependencies are created successfully for the healthcare product. In the same way, you can define the field dependencies for different products by following the step-by-step easy guide as discussed in this section.

Further, this is necessary to define which type of values you wanted to save in controlling fields and dependent field, it can be anything from a number to the alphabet or formulas etc. In the next section, we will discuss the complete list of data types for field dependencies and how they can be used to make the concept little more relevant and useful for the users. salesforce quiz

Read: How to Get & Reset Security Token in Salesforce Lightning

A list of Data types for Field Dependencies

Auto-number This is a sequence number that is system dependent and using a display format. If you are planning to use this data type then the number will automatically increase by one for the next new record added.
Formula This is a read-only field that is taking its value from the formula expression. The value of the formula field will change automatically as soon as the value of the source field will be changed. With the help of a formula field, you can define the custom summaries based on reported data and the calculated values. Further, these formulas can also be used as the columns in the report.
Look relationship This field created the relationship with the help of which one object can be connected with the other. With the help of this relationship, you can always choose the lookup icon to select values from the pop-up list. The second object will be the source of value in the list.
Roll-up Summary This is again a read-only field that helps you to display the values like sums of numbers, maximum value from the list, minimum values from the list, total count for all records and much more.
Master-Details Relationship As the name suggests, this relationship will define the master-slave relationship between objects or we can say parent-child relationship too. This is necessary to define the relationship field for almost all detail records. Once you have defined the relationship field and it has been saved then you cannot change it. The ownership for the field is further defined by the master record. If a user deleted the master record then detail record will be deleted automatically.

The roll-up summary fields can also be defined for the master record to summarize the detail record.

Checkbox With this field, you can always select the true or false values for the objects. The checkbox values can be defined as controlling fields, not the dependent fields.
Currency With the help of a currency field, you could enter the amount in different currencies like Dollars, Indian rupees or more. This is also useful in exporting data to the excel file or other spread sheets.
Date With the help of this field, you can always enter the data or pick the date from the popup calendar.
Date / Time Next popular data type is Date/time field where you can pick both either date or time from the popup calendar. The choice is up to you or it also depends on project requirements either you wanted to use the date field only or you wanted to add date/time both.
Email This field will allow users to enter an email address and validate the data in the proper format. If the field is defined as lead or contact, the address will be picked up automatically based on records. Keep in mind that custom email address cannot be used for mass emails.
Percent What to do if you wanted to add a percent number? With the help of percent data type, the sign of percentage will be automatically added to the number but make sure that fields are marked as percent during declaration.
Phone Give flexibility to users so that they could add phone number automatically in the proper format either mobile number or the landline.
Number With this data type, you can add any type of number but the leading zeros are removed later when you store the values.
Picklist With the help of this data type, one value can be picked from a long list defined by the user. In a few cases, there is freedom to select multiple values too, if the multi-select option for the picklist is validated.
Text As the name suggests, it will allow users to add letters, numbers or the combination of letters or numbers too. It is common in the case of user id or passwords.
Text areas With this data type, you can limit the count of characters that can be entered by the user in the given space. In most cases, it is 255 characters only. You can define the long text areas too where users are allowed to enter up to 32,768 characters or more.   With the rich text area option, users are allowed to enter formatted text, images or links etc. next is encrypted Text area where values are added in the form of text or numbers and it is stored in the encrypted format.
URL with this data type, users are allowed to add any valid email address. As soon as users click on the link, it will open in a separate browser.

free salesforce demo Final Words:

With this discussion, you have a complete information of Field dependencies, how to create Field dependency in Salesforce and different data types for field dependencies etc. Once you will go through each of the sections carefully, you can quickly start using them practically and don’t forget to validate the values ahead. I hope you enjoyed reading the blog and learned something new with this blog post. Don’t forget to share your experience with us!

Read: What Is Interesting About Salesforce Internships?

Salesforce Tutorial Overview


    Janbask Training

    JanBask Training is a leading Global Online Training Provider through Live Sessions. The Live classes provide a blended approach of hands on experience along with theoretical knowledge which is driven by certified professionals.


Trending Courses

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

4 days 24 Nov 2019

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

5 days 25 Nov 2019

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

5 days 25 Nov 2019

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

6 days 26 Nov 2019

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

-1 day 19 Nov 2019

Course for testing

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

34 days 24 Dec 2019

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

13 days 03 Dec 2019

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

5 days 25 Nov 2019

SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

-1 day 19 Nov 2019

Comments

Search Posts

Reset

Receive Latest Materials and Offers on Salesforce Course

Interviews