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
Rung41Rung41 

Prevent specific field change once it's been updated

Currently have a Event picklist field with the values of Yes and No that is prepopulated with No when an Event is created. Once the user changes the picklist field to Yes, I want to use a validation rule prevent them from changing it back to No. The issue I am running into is that every validation rule I have tried prevents them from editing any other field on the record and not just the specific picklist field.

Here is my current validation rule: AND(
ISPICKVAL(PRIORVALUE(Sales_Call_Completed__c),"Yes"))

Best Answer chosen by Rung41
pconpcon
I think you want to say something like
 
AND(
    ISPICKVAL(PRIORVALUE(Sales_Call_Completed__c), "Yes"),
    ISPICKVAL(Sales_Call_Completed__c, "No")
)

That would say that it's currently set to No and the prior value was set to Yes.

All Answers

pconpcon
I think you want to say something like
 
AND(
    ISPICKVAL(PRIORVALUE(Sales_Call_Completed__c), "Yes"),
    ISPICKVAL(Sales_Call_Completed__c, "No")
)

That would say that it's currently set to No and the prior value was set to Yes.
This was selected as the best answer
sampath kumar 3sampath kumar 3
If we have multiple values in the picklist then how to set the priorvalue ?
pconpcon
What do you mean "multiple values"?
Rung41Rung41
That worked. Thanks PCon. Still not sure why I couldn't edit other fields with the other validation rules I tried but I appreciate your help.
pconpcon
The reason you could edit the other fields with the validation rule you had initially is it did not take into account what the current value was.  It only said "was it 'Yes'" not "Is it currently 'No' and it was previously 'Yes'".  The PRIORVALUE for the field will always be the current value if the value has not been changed.  So if you update another filed PRIORVALUE will be equal to Yes and the current value will also be equal to Yes.
Rung41Rung41
Thanks again for the insight.
sampath kumar 3sampath kumar 3
Multiple values means , In picklist we have 100 values and the first value as default . How can we set the remaining values as PRIORVALUE
AND( ISPICKVAL(PRIORVALUE(Sales_Call_Completed__c), "Yes"), ISPICKVAL(Sales_Call_Completed__c, "No") )
pconpcon
sampath, I think what you are asking is a different issue than what was originally asked here.  If you can please create a new post with your question and an example of what you are trying to accomplish we can help you there.