+ Start a Discussion
Ken_KoellnerKen_Koellner 

apex:inputField and pick lists, are Field Dependencies reflected in available values?

SF now supporse Field Dependencies in pick list values.  So the available list of pick list values can be driven by what's selected in another pick list field.

 

Do you konw if that is honored in the apex:inputField with an sObject in VF?

 

In other words, if I put both pick list fields on the page with apex:inputField, will the available values of the 2nd pick list be driven the first pick list assume the dependencies defined that way?

 

 

 

A follow up question also, sometimes, you need to use an hand-coded drop down that isn't an inputField as  you want the same list of values for a field that isn't in an sObject.  I know you can query metadata to get the list off picklist values for a field.  Can you query the metadata and get the information about the Field Dependicies also?

 

Shashikant SharmaShashikant Sharma

Question 1 : Do you konw if that is honored in the apex:inputField with an sObject in VF?

In other words, if I put both pick list fields on the page with apex:inputField, will the available values of the 2nd pick list be driven the first pick list assume the dependencies defined that way?

 

Answer : Yes

 

 

 Question2 :

A follow up question also, sometimes, you need to use an hand-coded drop down that isn't an inputField as  you want the same list of values for a field that isn't in an sObject.  I know you can query metadata to get the list off picklist values for a field.  Can you query the metadata and get the information about the Field Dependicies also?

Answer : No, you can not describe dependency information of picklist values