+ Start a Discussion
Narayan HNarayan H 

How can I make fields Conditionally Read-Only - based on a picklist value

Can someone help me get moving with some data validation please?

I would like to set a field as being conditionally read-only based on the value of a picklist. What I have is a picklist that shows the specific Account type. Based on that selection I would like to have some fields red-only so that I can enforce some level of process control.

I really appreciate your help in this regard.
pconpcon
The only way to do this is with VisualForce.  You will have to have code in your controller that determines if the field is an outputfield (read only) or an inputfield (read / write).  Then you'll need to call a reRender on the fields on change the dropdown.  This blog post may give you some help for this.

http://blog.deadlypenguin.com/blog/2012/07/09/dynamic-dependent-picklists-in-salesforce/
SarfarajSarfaraj

This is possible using custom code and Visualforce page.

However if you want to go with the configuration you have to use validation rules. You have to configure a validation rule to validate if the picklist value is some value say 'A' then the fields under consideration should match with their prior value.

I have configured one with this logic: If the Account Rating is 'Hot' you cannot change the Account Number and Name. Here is the validation rule,
User-added image

--Akram