
How do I meet this below requirement? Appreciate your help!!
Work Order entity has 1 to many relationship with custom Work Report entity (1 WO can have 1 or many Work Reports).
Work Order can not be marked as complete (System status=Complete) when no work report is entered (count =0 of Work Report entity for the given Work Order). I was trying to write javascript on Work Order entity, OnChange event of System Status, to validate this criteria but could not find way how to get the count of the related entity record.