Email address access through SOAP Web services and CRM 7.1 SP2

Hi All

Below is an extract of modified code from the sixthapp web services solution that Jeff Richards created. We are running the solution against Sage CRM 7.1 SP2 and the problem that we are seeing is that the CRMEmail.type never equates to "Business".

When we comment out comparison and just use the first email address that comes along, we get the email address but we don't know if this is going to work every time.

Is this a bug in the web services API or what?

Can someone please offer some insight into this?

Thanks


//extract the email address records
CRMCompanyEmail = CRMCompany.email;
CRMBase2 = CRMCompanyEmail.records;
for (int intCount = 0; intCount
{
CRMEmail = (email)CRMBase2[intCount];
if (CRMEmail.type == "Business")
{
//MessageBox.Show(CRMPerson.lastname);
labelComp_email.Text = CRMEmail.emailaddress;
break;
}
}