Quantcast
Viewing all articles
Browse latest Browse all 79901

How can i add More than one TO value in Email Entity?

I use the following code for add the userid in Email Entity To's field.If I enter the single value (a single user) in to field the following code will working fine.

Now, I need to add more than one user id in TO field which means i need to send multiple emails at a time.How can I add multiple to fields in CRM email Entity.

Entity email = new Entity();
EntityReference to = new EntityReference("systemuser", new Guid("<Guid Here>"));

//Derive to party
Entity toParty = new Entity("activityparty");
toParty.Attributes.Add("partyid", to);

EntityCollection collToParty = new EntityCollection();
collToParty.EntityName = "systemuser";
collToParty.Entities.Add(toParty);

email.Attributes.Add("to", collToParty);

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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