You need to sign in to do that
Don't have an account?
mw6
Validation rule between a picklist field and a look up field
I have a Picklist field on Case called Type with values 'Teacher Related, Policy Feedback, Curriculum Feedback' I have another field called Teacher_Name__c. I need some help to write a validation rule so that if the user select the either 'Policy Feedback' or 'Curriculum Feedback' The teacher_name__c field should be made non editable and when the user choose 'Teacher Related' the Teacher_Name__c should be allowed to choose the teacher name.
However, if you want UI level control to disable / enable Teacher_Name__c field based on the Type selection, you need to use a VF page with javascript.
Hope this helps.
All Answers
However, if you want UI level control to disable / enable Teacher_Name__c field based on the Type selection, you need to use a VF page with javascript.
Hope this helps.
Please take a look on below rule, it will help you.
AND(NOT(ISPICKVAL(Type, 'Teacher Related')), ISCHANGED( Teacher_Name__c))
Thanks
Shivdeep
You can use above answer. It will help you
Thanks
We cannot make lookup field non-editable through validation rule but we can restrict the user to change Teacher name when 'Policy Feedback' or 'Curriculum Feedback' is selected.
(ISCHANGED(teacher_name__c ) && (ISPICKVAL(Type,"Policy Feedback") || ISPICKVAL(Type,"Curriculum Feedback")))
||
(ISNEW() && (ISPICKVAL(Type,"Policy Feedback") || ISPICKVAL(Type,"Curriculum Feedback")) && NOT(ISBLANK(teacher_name__c )))