Hi Everyone,
I am writing a BPM , part of which is creating a comma delimited string of email addresses. This is working as it should but can have a number of duplicates. Eventually this string is placed in the ‘To’ field of the email widget. I would like to remove the duplicates and have tried using ‘Distinct’ and ‘Split’ but I just keep getting errors. Do I need to add something in ‘Using’ or ‘References’ to do this?
SalesRep = (from SalesRep_Row in Db.SalesRep
where (SalesRep_Row.Company == Session.CompanyID
&& SalesRep_Row.SalesRepCode == salesRepCode)
select SalesRep_Row).FirstOrDefault();
if (SalesRep != null)
{
if (emailRecipients == "")
{
emailRecipients = SalesRep.EMailAddress;
}
else
{
emailRecipients = emailRecipients + "; " + SalesRep.EMailAddress;
}
callContextBpmData.Character03 = emailRecipients;
/*
msg = "Email Recipients are " + emailRecipients;
this.PublishInfoMessage(msg, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, "SalesRep", "Update");
*/
}
Thanks in advance
Adrian.