You need to sign in to do that
Don't have an account?
Victoria Kerry
Validation rule to lock a field when the prior value something specific
Hello everyone,
I'm currently wokring on creating a validation rule where if the field "Source" is = "Task" that it can no longer change and is "locked in" so to speak. Here's my latest attempt:
AND(
ISCHANGED(Source),
ISPICKVAL(PRIORVALUE(Source),"Task")
)
However, when activated I can still change Source to whatever I want. Can anyone help?
I'm currently wokring on creating a validation rule where if the field "Source" is = "Task" that it can no longer change and is "locked in" so to speak. Here's my latest attempt:
AND(
ISCHANGED(Source),
ISPICKVAL(PRIORVALUE(Source),"Task")
)
However, when activated I can still change Source to whatever I want. Can anyone help?
AND(ISCHANGED(Source),
ISPICKVAL(PRIORVALUE(Source), "Task"),
NOT(ISPICKVAL( Source, "Task")))
please mark it as best answer if it helps
All Answers
Greetings!
I think you need to add NOT operator for ISCHANGED() function as suggested in the below:
https://salesforce.stackexchange.com/questions/126253/validation-rule-to-prevent-editing-record
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
That doesn't seem to be working for me either. I've tried:
AND(
NOT(ISCHANGED(Source)),
ISPICKVAL(Source,"Task")
)
and:
AND(
NOT(ISCHANGED(Source)),
ISPICKVAL(PRIORVALUE(Source),"Task")
)
AND(ISCHANGED(Source),
ISPICKVAL(PRIORVALUE(Source), "Task"),
NOT(ISPICKVAL( Source, "Task")))
please mark it as best answer if it helps