I need some Jscript help for a CRM 2013 Form onload event that needs to reference a property from it's child records.
The parent entity is 'Contact'. The child entity is custom, lets call this entity 'Child'. The property referenced by the onload event is a Boolean two option field (yes/no), lets call this field 'Happy'.
What I need is for the 'Contact' form to display an alert message when none of the 'Child' records have the property 'Happy' set to 'yes'.
Example;
-If a 'Contact' has 2 'Child' records and both child records have property 'Happy' set to 'no', then show alert 'the children are not happy'
-If a 'Contact' has 2 'Child' records, one 'Child' record has 'Happy' set to 'yes', one 'Child' is set to 'no', then do not show alert
Any help with this would be great. Thanks