Am designing a JQuery AutoComplete search box in visualforce page and getting the data source from controller class from two picklist fields(Controlling and dependent). The autocomplete search box works fine but it loads all the values from the picklist fields. I want to load the picklist values based on record type. Here

List<Schema.PicklistEntry> contrEntries = ctrlField.getDescribe().getPicklistValues();
for (Schema.PicklistEntry ple : contrEntries) {
    String label = ple.getLabel();
    objResults.put(label, new List<String>());

Can we add the picklist values based on particular record type?.

I found that this can be done using MetaData API, but I don't want to deploy all the MetaData files into our client org.

Can be done using describeLayout?. If yes, please help me to understand.


sorry i tried over same issue but didnt get any solution but you can get idea by success comunity by rest call



Hey mate not sure if you've sorted your problem however here is an article that has a workaround using apex https://bugcoder.it/?p=38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.