Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

can't able to create email activity with CC field

$
0
0

I need to create email activity with cc field,I use the following code for add values in cc field it throws the error

       string ccDetails ="<Guid1 here>,<guid2 here>"

string[] splitCCIds = ccDetails.Split(',');
EntityCollection collCcParty = new EntityCollection();
foreach (var ccId in splitCCIds)
{
EntityReference cc = new EntityReference("systemuser", new Guid(ccId));
Entity ccParty = new Entity("activityparty");
collCcParty.EntityName = "systemuser";
collCcParty.Entities.Add(ccParty);
}
email.Attributes.Add("cc", collCcParty);

Error: I got the following error.

Cannot create activity party: either partyid or addressused field should be present

But I use the same code for add the values in "To" field its working fine.How can I add the values in cc Field.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>