I have three different objects A (Grand Parent), B (Child) & C (Grand Child). All the three objects are related by a lookup relationship. Now, there is field on A object, IsActive which is a checkbox and another field IsEligible on object C which is also a checkbox.
Now, if any of the Grandchild associated with A is having IsEligible marked as TRUE, then IsActive on the A's record should be marked as TRUE . If none of the Grandchild records are having IsEligible marked as TRUE, then IsActive should be marked as FALSE.
Parent - A Child - B1, B2 GrandChild - C1, C2 associated with B1 & C3, C4 associated with B2.
If either of the records, C1, C2, C3, C4, has IsEligible = TRUE, then IsActive = TRUE on A. If neither of the records, C1, C2, C3, C4, has IsEligible = TRUE, then IsActive = FALSE on A.
How can this functionality be achieved?