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
rvg170550rvg170550 

Make custom field(s) protected (not protected), depending on value of another column in the object

Can i make a custom field dynamically read-only or editable, depending on the value of another custum column ?

Example: I want all my custom fields, related to cancellation info, to be read-only if product_stage is not cancelled, and editable if product_stage is cancelled
werewolfwerewolf
You can't do that right now.  You can create validation rules that error out if those fields have been edited, or you can change the record type of the object which changes the layout (but you can't do that dynamically on the fly), but you can't dynamically change the visibility or writeability of fields on an edit page.
rvg170550rvg170550

Thanks for your quick advice, I thought I could dynamically make fields protected / not-protected.I will implement it, using validation rules and workflow