0

Requirement: I have 3 fields as Test1,Test2 & Test3. Test 2 & Test3 are Lookup Fields. If i select Test2 then Test 3 field need to be required.Test1 is a check box.Here is a validation reule on Test1 as if Test1 (Not checked) ----> Either Test2 or Test3 should select. Test2(checked)-----------> Not need to select any thing.

Here My requirement is --------->Test1(not checked)----If test2 selected from lookup then test 3 should be required.

Please guide me how to achieve this by trigger or Validation rule?

2
  • 4
    This question is a little confusing, not least because everything is called Test. Can you try to rephrase it so that it's easier to understand?
    – Matt Lacey
    Commented Jan 13, 2014 at 6:25
  • 1
    I tried to edit/align the question, but there also seems like a problem in your Validation rule. (or not) - You write: Test2 checked - Test2 is a lookup field. did you mean Test1? (feel free to rename to: Test1 --> CB1, Test2,Test3 -->> LF2 and LF3)
    – Saariko
    Commented Jan 13, 2014 at 12:07

1 Answer 1

3

Have you tried making a validation rule ? It's very straight forward and self explanatory. You have 2 separate requests, and they can each be done as a validation rule. If I understood correctly:

If test1(checkbox) is not checked either Test2 (lookup) or Test 3(lookup) should have a selected value.

NOT(Test1) && (ISBLANK(Test2) || ISBLAnk(Test 3))

Please make a selection in Either Test 2 or Test 2 when you do not check Test 1.

If test2 has a selected value, a lookup selected value is also required in the Test3 lookup.

NOT(ISBLANK(Test2)) && ISBLANK(Test3)

Please select a record in Test3, this is required if you have selected an X in Test 2.

Not the answer you're looking for? Browse other questions tagged .