I'm currently gathering metadata on fields using a controller and was investigating using Dynamic Visualforce Bindings instead. I can see that I can iterate through a controller-supplied list of fields like this:

<apex:repeat value='{!fieldList}' var='field'>
    console.log('$ObjectType[object].Fields[field].Name} = {!$ObjectType[object].Fields[field].Type}');

to list the names and types of the controller-supplied field list. The manual only describes a handful of attributes, but I discovered that if I generate a WSDL for my org, under the definition of "Field" I can see a list of other choices such as autoNumber, calculated, etc. which do seem to work. One attribute of great interest to me is picklistValues, but unlike the simpler fields I haven't succeeded in using it in a page. I tried this:

<apex:repeat value="{!$ObjectType[object].Fields.MyPicklistField__c.picklistValues}" var="val">

but that produces a Visualforce error: "Unsupported type common.api.soap.wsdl.PicklistEntry".

Is there any way to get the picklist values for a field through Dynamic Visualforce Bindings?

  • Did you find a solution for this ? – snehakem Feb 19 '16 at 8:03
  • 1
    @snehakem no, at the time the answer from Greg Grinberg seemed definitive. You can get the information from the controller anyway. Furthermore these days there are better ways to handle lists of fields in a generic way. – Jeff Trull Feb 23 '16 at 5:53

This is impossible to do even with regular visualforce. The following page will give you the same error at compile-time that you see at runtime with dynamic vf.


I ran into this issue about a year ago and there is no workaround except returning the list of picklistEntries from the controller. Ex:

<apex:page controller="picklistentryController"> 
    <apex:repeat value="{!entries}" var="val">

public with sharing class picklistentryController 
    //for dynamic vf simply build a map of fieldnames to lists of picklistentries,
    public list<Schema.Picklistentry> getEntries(){
        return Account.fields.Industry.getDescribe().getpicklistvalues();

NOTE: If you are supporting multiple languages and using the apex:page lang parameter to set the language of the page anything referenced in apex (picklistentry labels in this case) will ignore the parameter and be returned in the language of the running user instead.

  • That's it, then! No choice but to get the metadata from the controller... Maybe someday I'll use dynamic vf bindings - but not this time. Thanks. – Jeff Trull Feb 9 '13 at 4:30

As Greg Grinburg says, it is impossible to achieve the result you want through dynamic VisualForce bindings alone.

However, it may be worth noting that your workaround can have an equivalent degree of flexibility if that flexibility is worth the verbose syntax.


class MyController
  public Map<String, Schema.SObjectType> schemaInfo 
    get { return Schema.getGlobalDescribe(); }


<apex:page controller="MyController">



I was trying to achieve the same thing and faced the same error "unsupported type common.api.soap.wsdi.PicklistEntry encountered" while compiling.

But there is another way to access the picklistValues, instead of passing a list of field names you can pass a list of DescribeFieldResult to the page, you then have access to the getPicklistValues method as defined in the Describe Field Result Methods.


There is an excellent post by Bob Buzzard on this specific issue and it covers picklistValues as well Record Type Specific Picklist Values

  • Thanks for the link, but as I mentioned I am trying to do this with dynamic visualforce bindings. Bob's post describes something different: controller methods for dependent picklists. If I can't do this as I want, I will certainly try doing it through the controller, but my goal is to use this feature. – Jeff Trull Feb 8 '13 at 17:26

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.