Vivek P
Vivek P

Reputation: 3050

How to make field read-only after changing the field value

I have an object which has a field picklist it contains values open and close , what I am trying to achieve : when a record is inserted with the picklist value close I am trying to make the field read-only when the field changed to close.

How can I achieve this ???????

Upvotes: 0

Views: 9026

Answers (2)

tggagne
tggagne

Reputation: 2884

Use two fields, where one is read-write and the other read-only. The same information can be written to both fields using either a trigger or field-update rule. Display the read-only when it's closed, else display the read-write field.

Of course, that's probably easier to do in Visualforce than not.

Upvotes: 0

amrcn_werewolf
amrcn_werewolf

Reputation: 841

You can add a validation rule like

AND(ISCHANGED(Field__c),ISPICKVAL(Field__c,"Close"))

That would throw an error if the field's value is "Close" and someone tries to change it.

Upvotes: 2

Related Questions