1

There are two objects obj1 and obj2. Obj1 has picklist(multiselect) field as f1 and it has values as A B C and D, obj2 has picklist field as f2 and picklist(multiselect) field as f1(same as obj1.f1).

Obj2.f1 is dependent on f2 and D is selected as default value.

In VF page while displaying Obj2.f1 I'm trying to change its value based on the value inserted in Obj1.f1 using but it is not updating values correctly.

Can we Dynamically update the value of a picklist(multiselect) field when it is dependent on other picklist ?

Thank you,

Rahul S

  • Is it really Obj2.f1? Not Obj1.f1? – Sergej Utko Jun 27 '16 at 13:27
  • Hi Sergey Utko, Its obj2.f1 and i'm using <apex:actionSupport></apex:actionSupport> to change its value to value inserted in obj1.f1 – Rahul Sherikar Jun 28 '16 at 5:09
1

A multiselect picklist cannot be a controlling field. It can be a dependent picklist only. This is a documented limitation. See Dependent Picklist Considerations.

EDIT

I'm not certain I understand your follow-up question in comments because of your use of the word "dynamically". Out of the box functionality will allow a multiselect picklist to be controlled by a simple picklist. One controlling value that's selected can allow multiple values of your choice to be displayed from the multiselect list. That relationship can be configured in the setup UI. You can also establish it using selectOptions with a controller extension or custom controller. I hope that answers your question.

  • Hello crmprogdev, Thanks for Answering. My doubt is that when a multiselect picklist is dependent on other picklist which is not multiselect, then can we change the value of the dependent pick list dynamically? – Rahul Sherikar Jun 28 '16 at 5:02
  • See my edited answer. – crmprogdev Jun 28 '16 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.