• #42378
    Salesforce | Manpreet Manpreet #227
    Forcetalks

    What is a dependent picklist in Salesforce?

    What is a dependent picklist in Salesforce?

     

    #42379
    Salesforce | shariq shariq #1
    Forcetalks

    Dependent Picklist allows to contain multiple values and pick value one among them or Multiple values among them. Dependent fields depends upon controlling field.

    #42892
     Prachi #6
    Forcetalks

    hi,

    Dependent picklist is very useful within the Salesforce CRM for many reasons.  It is used to limit the list of values in one picklist based on the value of another picklist.Dependent Picklist allows to contain multiple values and pick value one among them or Multiple values among them. Dependent fields depends upon controlling field.

    thanks

    #42971
     Anjali #7
    Forcetalks

    Hi,

    Dependent picklists in Salesforce are very useful. They are used to limit the list of values in one picklist based on the value of another picklist.

    An example would be if you had a list of countries and states/provinces . If you select a country you would want the list of states/provinces to be filtered in the next picklist.

    Visualforce page

    Apex Class

    public class DependentPicklistExpClass {
    public String country{get;set;}
    public String state{get;set;}
    public List getCountries()
    {
    list options=new list();
    options.add(new SelectOption('none','countries'));
    options.add(new SelectOption('US','United States'));
    options.add(new SelectOption('IN','India'));
    return options;
    }
    public list getStates()
    {
    list options=new list();
    if(country=='US')
    {
    options.add(new SelectOption('none','states'));
    options.add(new SelectOption('st1','State1'));
    options.add(new SelectOption('st2','State2'));
    }
    else if(country=='IN')
    {
    options.add(new SelectOption('none','states'));
    options.add(new SelectOption('UP','Uttar Pradesh'));
    options.add(new SelectOption('UK','Uttarakhand'));
    }
    else
    {
    options.add(new SelectOption('none','states'));
    }
    return options;
    }

    }

    #42972
     Anjali #7
    Forcetalks

    Hi,

    The Dependent Picklist Field type is a special type of single-select picklist that displays different available values depending on the current selection in another (main) picklist.

    • This reply was modified 3 months, 2 weeks ago by  Anjali.
    #50252
     Divya #11
    Forcetalks

    Hi Manpreet,

    A dependent picklist is a custom or multi-select picklist for which the valid values depend on the value of another field, called the controlling field. Controlling fields can be any picklist or checkbox field on the same record.

    #51114
     William #5
    Forcetalks

    A Dependent picklist helps the user in adding consistent and accurate data. The valid values in dependent picklist are generally dependable on values of other fields and this is called the Controlling field. The controlling field could be any picklist not more than 300 values on the same record. The other name for the dependent picklist is the custom picklist that can be defined for Opportunities whose valid values will surely depend on some other field.

Viewing 7 posts - 1 through 7 (of 7 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?