CompanyDroneFromSector7G
CompanyDroneFromSector7G

Reputation: 4517

Retrieve active incidents for a contact

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!

Upvotes: 0

Views: 126

Answers (1)

lazarus
lazarus

Reputation: 2017

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.

Upvotes: 1

Related Questions