You need to sign in to do that
Don't have an account?

checking lookup filed value in validation rule
i have 2 objects namely objA,objB.
i have created lookup relationship on objB to objA. objA have some values like abc,xyz(two record names).
here i want to write a validation rule on objA.
While creating objB records when i select abc record from objA i want to make one field mandatory in objB.when i select another record that is xyz record i dont want to validate that field.
i hope im clear with my question.
Regards
Lakshman
i have created lookup relationship on objB to objA. objA have some values like abc,xyz(two record names).
here i want to write a validation rule on objA.
While creating objB records when i select abc record from objA i want to make one field mandatory in objB.when i select another record that is xyz record i dont want to validate that field.
i hope im clear with my question.
Regards
Lakshman
Write a small trigger checking the value of the lookup field and if the value is 'abc' then put .addError message if the user makes the field to be kept as mandatory empty.
Also, Using normal Customizations, If you check the field to be made as mandatory and the lookup field, you can create a validation rule & validate.
Important :
If this is what you where looking for then please mark it as a solution for others benefits.
Thank You
AND(objA__r.Name = "abc", ISBLANK(Mandatory_Field__c))