You need to sign in to do that
Don't have an account?
jaw999
Visualforce dependent picklists not respecting controlling fields
I have two picklists. One controls the other.
In my visualforce edit page, the dependent field always shows all options no matter what is selected in the controlling field.
I am confused if this is something I need to code for.
Some links seem indicate that regular apex:inputfield should handle the restrictions.
Examples:
http://salesforce.stackexchange.com/questions/5439/how-can-we-write-dependent-picklist-through-apex-code/
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_dependent_picklists.htm
Am I misunderstanding this?
My simple test page always shows all choices available in the dependent field.
In my visualforce edit page, the dependent field always shows all options no matter what is selected in the controlling field.
I am confused if this is something I need to code for.
Some links seem indicate that regular apex:inputfield should handle the restrictions.
Examples:
http://salesforce.stackexchange.com/questions/5439/how-can-we-write-dependent-picklist-through-apex-code/
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_dependent_picklists.htm
Am I misunderstanding this?
My simple test page always shows all choices available in the dependent field.
<apex:page standardController="Opportunity"> <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="{!Opportunity.Global_Entity_Type__c}"/> <apex:inputField value="{!Opportunity.SubType__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
All Answers
Can you check this point is valid in your case.