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

Cast EntityCollection to IEnumerable

$
0
0

Hi,

In a plugin, i need to set the value of a field ('pdeCopy.Bcc', type : IEnumerable<ActivityParty>) with the value of another field ('pdeEntity.Attributes["bcc"]', type : EntityCollection).

I tryed to write this line of code :

pdeCopy.Bcc = (IEnumerable<ActivityParty>)pdeEntity.Attributes["bcc"];

But i get the error :

"Impossible d'effectuer un cast d'un objet de type 'Microsoft.Xrm.Sdk.EntityCollection' en type 'System.Collections.Generic.IEnumerable`1[ActivityParty]'."

 

Can you help Me?

 

Thanks,

 

Paul


Viewing all articles
Browse latest Browse all 55831

Trending Articles



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