Currently there are two Describe Field Methods (getPicklistValues() and
isDependentPicklist()) which allow you to get the values from a picklist and also to check if the picklist is dependent.
It would be great if there was a method in which you can pass a dependent picklist and get all dependent values and controlling values from both picklists (the controlling and the dependent one).
For an instance we have a controlling picklist with values (A, B, C, D) and dependent picklist with values (1, 2, 3, 4). Let's say the dependecy is (A - 1; B - 2; C - 1 & 3; D - 3 & 4).
There is a way to get these dependecies with JS and VisualForce (front-end) which is not very efficient due to some dirty hacks (Example Here
). However, there is no way to achieve this in APEX.
I've seen other examples like using the Metadata API but it would be good fo if this is possible to do in the backend.
I am sure this is one big missing functionality that many users are looking for and I'm looking forward for an implemented solution to this idea as soon as possible.