You need to sign in to do that
Don't have an account?
Missing Field Values
I have 3 dependent picklists set up in my Case object and when I place the fields on my visualforce page via <apex:inputField>, they are missing some of the field values that should be displayed in the picklists. I have verfied that they are selected in the dependecy matrix, and checked that no Record Types or workflows would have them removed as well. Is there something that I'm not thinking of that drives the display for picklists in a visualforce page?
Cehck your API used for page
Dependent picklists can only be displayed onVisualforce pages with a Salesforce.com API version 20.0 or higher.
Adding Dependent Fields to a Page
Dependent fields provide a way to filter the field values displayed on a Visualforce page. Dependent fields consist of two parts: a controlling field that determines the filtering; and a dependent field that has its values filtered. Dependent fields can dynamically filter values in fields such as picklists, multi-select picklists, radio buttons, and checkboxes. Dependent picklists can only be displayed on Visualforce pages with a Salesforce.com API version 20.0 or higher. For more information, see About Dependent Picklists in the Salesforce.com online help.
- Click Your Name | Setup | Customize | Accounts | Fields
- Click New in the Custom Fields & Relationships section of the page.
- Choose Picklist and click Next.
- Enter Subcategories for the Field Label.
- Enter the following terms for the list of values:
- Apple Farms
- Cable
- Corn Fields
- Internet
- Radio
- Television
- Winery
- Click Next twice, then click Save.
To define the field dependencies for Subcategories:<apex:page standardController="Account"> <apex:form > <apex:pageBlock mode="edit"> <apex:pageBlockButtons > <apex:commandButton action="{!save}" value="Save"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Dependent Picklists" columns="2"> <apex:inputField value="{!account.industry}"/> <apex:inputField value="{!account.subcategories__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
When you select Agriculture from the Industry picklist, the Subcategories picklist contains Apple Farms, Corn Fields, and Winery. If you select Communication, your Subcategories picklist contains all the Communication types defined earlier.