Sometimes Salesforce have great functionality but do an average job of describing it and offering ideas for when to best use the functionality.
Enter Dependent Picklists as a great example as described here.
How about this as a shorter description ‘Say you have a picklist of Continents and want another picklist to show the countries of the selected Continent’.
Set up a custom object called Travel and then add a picklist for the Continents (assuming we never go to Antartica).
Now lets set up a Countries picklist:
So we have our picklist setup we just need to link them together so this is where the fun begins:
- From the ‘Fields & Relationships’ section of the Object click the ‘Field Dependencies’ button
- Click ‘New’
- Set the Controlling Field to be ‘Continents’ (this controls what the other picklist shows)
- Set the Dependent Field to be ‘Countries’
- Click Continue
Now in a one page screen we can match what countries are in what continent.
If you read the instructions on the screen then all is clear – but basically use the table to select the entries on each row that match the column – so the first column is ‘Europe’ so select the countries of Europe (double click to toggle the entry or select multiple entries and then click the include Values). Those included are yellow.
You will end up with something like:
Only 5 columns are shown so click the ‘next>’ to show the last continent. Finally click Save.
Now on the page layout on a New record you will be able to select the continent and then matching countries.