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
AltranAltran 

Visible but not editable fields

Hi,

 

How can we make a custom field be visible but not editable depending on the value of another field in same page?

 

 

Many thanks,

Ana

salvatoreovlassalvatoreovlas

too generic. but if it is standard page you need a validation rule on the second field.

SFFSFF

Depends on what you mean by "visible but not editable". If you mean "disabled when field #2 is a certain value" then you can't do this using standard Salesforce. (This is easy using Visualforce, but of course you have to develop a new VF page, which may not be so easy.)

 

If you mean "when field #2 is a certain value, edits to this field cause an error message to be shown" then you can easily do this with a validation rule.

 

Good luck!