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
prasad@s.ax832prasad@s.ax832 

How to populate values from a global area into a drop down?

My requirement:

 

I have two drop downs in My screen

The first drop down should list only certain custom objects. (I dont want all of the custom objects available in the org to be listed here)

The second drop down is dependant on the first one, where I want to populate the record types into the second one based on which object was selected.

 

So If the first list had three options

Vehicle

Animal

Chemical

 

And I select Vehicle from first drop down, then second drop down should have all the record types of Vehicle and so on.

 

My questions:

a) is it possible to place all these specific custom objects that i need to populate into the first drop down in a global area that an admin can edit? Then I want to be able to query this into the drop down.

 

b) Any pointers to the overall solution to implementing the dependent drop down based on the scenario I described.

Best Answer chosen by Admin (Salesforce Developers) 
atlantisatlantis

ok, got it.

 

The 1st one, do Custom settings make sense?

 

The 2nd, you can refer this blog http://richardvanhook.com/2009/04/24/dependent-picklists-in-visualforce/

 

 

Regards

Atlantis

All Answers

atlantisatlantis

Hi prasad,

 

for 1st one, isnt possible to put the custom obj's name into picklist?

 

for 2nd, can you use field dependency?

 

 

regards,

Atlantis

prasad@s.ax832prasad@s.ax832

Sorry I was not clear.. This is a VF page and i didnt want to hardcode the object names there.

 

Second, I was not so sure how to use implement the dependent picklist in a VF page, although i did search through the forums. It will be helpful if you can please give me a pointer.

 

Thank you

Prasad

atlantisatlantis

ok, got it.

 

The 1st one, do Custom settings make sense?

 

The 2nd, you can refer this blog http://richardvanhook.com/2009/04/24/dependent-picklists-in-visualforce/

 

 

Regards

Atlantis

This was selected as the best answer
prasad@s.ax832prasad@s.ax832

Thank you Atlantis