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
pploesserpploesser 

Reorganizing dependent fields using visualforce

Hello everyone,

 

We have an an issue where we have a list of products that are dependent on other statuses..

 

When they open it up instead of being 

 

  • Product 1
  • Product 2
  • Product 3

It is showing up as

 

  • Product 3
  • Product 1
  • Product 2

 

Which is obviously out of order..

 

How can I fix this using VF? If you can provide examples that would be great, I am new to Apex.

 

Thank you in advance!

 

 

Madhan Raja MMadhan Raja M

If list of products is a picklist then edit the product picklist and enable the "Sort values alphabetically, not in the order entered. Values will be displayed alphabetically everywhere" checkbox.

 

Regards,

Madhan Raja M

pploesserpploesser

I was referring to the order of the fields when I double click the product and a pop up comes up displaying the options

Does that make sense?

Madhan Raja MMadhan Raja M

I am bit confused. Is list of products a picklist? For which object your creating a Visualforce page?

 

Regards,

Madhan Raja M

pploesserpploesser

Yes products is a picklist dependent on a "sector" picklist. This is on the opportunity. Does that help? The issue is when I double click the product picklist the order is not in the correct order.

 

I want to create a VF page to put them in a correct order.

pploesserpploesser

Here is an example on what I would like to do..

 

http://www.sundoginteractive.com/sunblog/posts/displaying-dependent-picklist-fields-on-a-visualforce-page

 

How/where do I create the controller portion? I think I may be able to modify what is listed above.