【发布时间】:2017-10-29 05:04:36
【问题描述】:
我有一个帐户 ID,并希望获取该帐户下的联系人集合以构建电子邮件列表。
//build up Email
private Email BuildEmail(ActivityParty allcontacts){.... build my emailhere}
private List<Entity> GetAllContactsFromAccountId(Guid accountId, List<Entity> toList)
{
//how can I get all the contacts here
foreach (Entity contact in Account.Contact.Entities)//????
{
Entity activityParty = new Entity("activityparty");
activityParty["partyid"] = new EntityReference("??", e.Id);
if (toList.Any(t => t.GetAttributeValue<EntityReference>("partyid").Id == e.Id)) continue;
toList.Add(activityParty);
}
return toList;
}
【问题讨论】:
标签: c# dynamics-crm microsoft-dynamics dynamics-crm-2016