var contacts = (from c in _xrmContext.ContactSet
where c.StateCode == ContactState.Active
&& c.EMailAddress1 == dr["EmailAddress"].ToString()
|| c.EMailAddress2 == dr["EmailAddress"].ToString()
|| c.EMailAddress3 == dr["EmailAddress"].ToString()
|| c.email == dr["EmailAddress"].ToString()
&& c.OwnerId.Id != teamId
select c).ToList();
if (contacts.Count > 0)
{
if (contacts[0].StatusCurrently == new OptionSetValue((int)Contact_StatusCurrently.OPEN)) --> I am using contacts[0].StatusCurrently which is reading only first contact from the list. I want to validate all the contacts from the list whose statuscurrently value is 'open'.
Any help would greatly appreciated
*This post is locked for comments