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
jochen5478jochen5478 

Dependent Picklist within Component

Hello!

 

I have tried to use the new dependent picklist feature. In a normal VF Page everything works fine. But if I move the code to a VF componet the dependency is gone.

Is this a known issue or could it be that I made some mistakes?

 

Thanks for your help!

 

Regards,

Jochen

Best Answer chosen by Admin (Salesforce Developers) 
AvromAvrom

Hi Jochen,

 

I can't seem to reproduce your problem, either with both picklists in the component or with the controlling picklist in the page and the dependent one in the component (I couldn't understand from your description which of these situations wasn't working for you).

 

The most common problem people seem to be running into with dependent picklists is the API version of their pages and components. In this case, both your page and your component must have an API version of at least 19 for you to see dependent picklist behavior. If your page has version 19 but you tried to move the code into a component with version 18 or less, you would see the dependency appear to evaporate (the solution, here, is to upgrade the API of your component).

 

 

All Answers

AvromAvrom

Hi Jochen,

 

I can't seem to reproduce your problem, either with both picklists in the component or with the controlling picklist in the page and the dependent one in the component (I couldn't understand from your description which of these situations wasn't working for you).

 

The most common problem people seem to be running into with dependent picklists is the API version of their pages and components. In this case, both your page and your component must have an API version of at least 19 for you to see dependent picklist behavior. If your page has version 19 but you tried to move the code into a component with version 18 or less, you would see the dependency appear to evaporate (the solution, here, is to upgrade the API of your component).

 

 

This was selected as the best answer
jochen5478jochen5478

You are absolutly right, i have missed that my component was of API 18.0. I don't know how this happend, I think I have checked this more than once.

 

Thanks for your help!

 

Regards

Jochen