In previous post about Hierarchical Picklist I left some unanswered questions in the end. We are going to discuss answer of those questions in this post.
First Question:
Bookshelf says that we need to use Picklist Hierarchical business component to create Hierarchical Picklist but in my example I used Picklist Generic and it still worked, Why?
In traditional method of creating Hierarchical Picklist we use Parent LIC field to create a Parent-Child relationship between LOV Types and in tools we use Parent Field to constraint the values of a child.
So, if we see the difference in the method I described and the method bookshelf described is just a field used to constraint the values of child and everything else is same.
If you go to definition of PickList Hierarchical BC and PickList Generic BC you will see that
- Both business components are based on same table.
- Both have same class
It is just that Parent field is present in Picklist Hierarchical BC and is missing from PickList Generic BC. I am not sure why this has been done but it essentially means that you can:
Expose Parent Field in Picklist Generic business component and use that in you constraints to create Hierarchical Picklist.
OR
You can use any other field present in business components to create a constraint and turn you Picklists into Hierarchical Picklist
Second Question:
When I change the parent value child value does not change.
For example I select value “Parent 1” in country field and its corresponding value “Child 1” in “State Field”.
Now I change the Parent Value to “Parent 2” and save the record, but it has no effect on child value, which is still showing “Child 1” (which of course is wrong now). How do we overcome that?
There are various ways to do it and I am going to discuss just one of them and leave others for you to find out and share with us here.
Solution:
- Create a calculated filed in PickList Generic (or PickList Hierarchical BC depending on what you are using) with following details
Name: Dummy
Calculated: Y
Calculate Value: = “” - Compile PickList Generic BC
- In the Country field (of your orignal BC), go to PickMap Object and create a new record with following details
Field: State
Picklist Field: Dummy - Compile the BC
Now when you change the value in Country Field it will result in Child Field becoming blank.
Hope this helps!!!
Your comments are always welcome


(3 votes, average: 4.67 out of 5)