function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Smita Hodiggeri (Admin)Smita Hodiggeri (Admin) 

Validation Rule to check status of related record's particular field is blank and if so throw error on the main record

Hi Community,

I have requirement where in there is an object (Engagement) which can multiple project tasks. I need to come with a validation rule which will fire on Engagement record when any of the project tasks created doesnt have a particular field (pratice field populated) in addition checking that Engagement record needs to be of particular practice.
I am thinking will having a lookup between relationship between Engagement and project task help me in coming up with a validation rule that would check if there ANY one of the project tasks exists with NO Practice field populated and it will fire up the validation rule.

Any thoughts on how this can be resolved would be appreciated.

Many thanks,
Smita 
Suraj Tripathi 47Suraj Tripathi 47

Hi Smita

As per your requirement , I have done same thing on account object whose child is contact ,so whenever we create contact under any account related and contact's firstname is empty then that record will not save. You can try this on engagement and project task object

ISNEW() && ISNULL( AccountId  )=false && ISBLANK(FirstName )

 

Please mark it as Best Answer if it helps!
Thanks