function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karthick RajaKarthick Raja 

Getting Dependent picklist values Via Apex

Hi folks,
        Can anyone tell me how to get the dependent picklist values dynamically based on the value of the controlling picklist via apex.

I dont want to use <Apex:inputtext> tag and other native apex tags
I need a custom logic for getting dependent picklist values in apex

Its uregent requirement 



Thanks in advance
Karthick
Shashikant SharmaShashikant Sharma
You can not do it with Apex APIs using describe results, you could do it though using metadata APIs.
Karthick RajaKarthick Raja
@Shashikant Sharma,


 We are using angularjs and bootstrap in our application
for that we have created the dependent picklist in our DEV org.
I'have to access the dependent picklist in visualforce page without using standard feature

For this I have to get the dependent pickllist values in apex 
Example:
Controlling_Field__c

Fruit, Vegetable, Dairy

Dependent_Field__c

(Fruit): Apple, Banana, Pear

(Vegetable): Tomato, Egglant, Lettuce

(Dairy): Milk, Cheese, Yogurt

If click the Dairy in first picklist then the second picklist only shows milk,cheese,yogurt
I need the code for this



Please help!