I have the id for a contact record but I need to know if there are any active incidents for that contact.
Retrieving a contact I can do with no probs, but I don’t know how to retrieve related records.
Does anyone have a code snippet to do this? I think I really just need the line that makes the call!
Thanks for your help!
If you already get contact, use the same way to find incidents. Instead of ContactSet you will need IncidentSet. In filter expression put condition that CustomerId/Id eq guid'” + yourContactId + “‘ and StateCode eq ‘0’ (for active cases).
Hope it helps!
PS I suppose that you are using oData, question has javascript tag.