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
HaydenMuhlHaydenMuhl 

Make certain fields invisible depending on value of picklist

I have an object called Trust. A Trust has one of two values: "Daily Valuation" or "Trust Accounting". Depending on which option is chosen I would like to display one group of fields or another.

Is this possible? Would this require Apex?

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert

If you are looking to make different fields visible based off a picklist value (or similar), then yes, I think Visualforce and Apex will be required.

 

Using Visualforce, you can display the values, and when a user selects one, you can re-render different sections of the page (hide one section, display another). 

 

 

All Answers

shillyershillyer

You can do this with Record Types, depending on what the user selects, they will see a different layout of fields.

 

Hope that helps,

Sati

HaydenMuhlHaydenMuhl

It sounds like that would get the job done, but I don't know if that would necessarily be the right tool for this job. The fields I would like to display are only one section of a much larger object. Are there other options?

Message Edited by HaydenMuhl on 02-27-2009 02:51 PM
aalbertaalbert

If you are looking to make different fields visible based off a picklist value (or similar), then yes, I think Visualforce and Apex will be required.

 

Using Visualforce, you can display the values, and when a user selects one, you can re-render different sections of the page (hide one section, display another). 

 

 

This was selected as the best answer
HaydenMuhlHaydenMuhl
Perfect.  I will look into that.
JasonGablerJasonGabler
Note that while this solution is correct, this is only true if you completely replace an edit form with a full Visualforce page.  Currently you cannot embed a Visualforce page into a standard page layout.  So if you want to put this sort of hide-if dependency on one, single field, you have to reinvent the entire form in Visualforce.  Bleh.
Message Edited by JasonGabler on 12-15-2009 11:58 AM