function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
venkataccvenkatacc 

Dependent picklist and dynamic binding

Hi All,

 I have a VF  page with different section.

In section 1 I have two pick list one is  controlling fields and  other is dependent field .

In section 2 I'm dynamically rendering a field set (using dynamic binding )based on the picklist value chosen in section 1 picklist field.

And also in section 2 I have dependent picklist field controlled by section 1 picklist field.

 

I'm using the onchange event on section 1 picklist field to render the section 2 fields.

 

Problem is section2 is hidden on section 1 picklist onchange,so during on change of picklist in section 1 page couldn't find the depend field in section 2 and it's failing.

 

Could any one give direction on this.

 

And also did anyone know How to set the dependent picklist in apex class i.e by sobject.fieldname='somevalue'.

I tried to set the dependent picklist to null in apex no luck.