You need to sign in to do that
Don't have an account?

Is it possible to retrieve picklist dependencies via Apex ?
Hi,
In a visualforce page I have a need for displaying picklist entries. The problem is that this field depends on another picklist field. Is there a way to get to the dependencies somehow ?
I'm stranded at :
This gives me all the values. However, I would like to be able to single out the values that correspond to a certain value in the controlling field ...
Thanks for your help,
David
In a visualforce page I have a need for displaying picklist entries. The problem is that this field depends on another picklist field. Is there a way to get to the dependencies somehow ?
I'm stranded at :
Code:
for(Schema.PicklistEntry p:Schema.sObjectType.Case.fields.getMap().get('Dependent_Field__c').getDescribe().getPicklistValues()) { System.debug(p.getValue()); }
Thanks for your help,
David
David VP - did you ever come up with a solution?
Till this day I haven't found a clean solution for this. For the time being the values are hard coded in our page.
So the question is still up for grabs ... anyone ?
-David
For my case (getting campaign member status), I retrieve all statuses related to a campaign using SOQL into a list of SelectOption in my Visualforce page controller then display/bind the variable in a VF page.