【发布时间】:2025-12-19 18:30:06
【问题描述】:
如何使用工作流c# 向 CRM 365 中的所有联系人发送生日电子邮件?
我写的代码:
var today = DateTime.Today.AddYears(-90);
var contacts = from c in orgContext.CreateQuery<Contact>()
where (c.BirthDate != null && c.BirthDate.Value.Month == today.Month)
where (c.BirthDate != null && c.BirthDate.Value.Day == today.Day)
select new { c.Id, c.LogicalName, c.BirthDate, c.FullName };
我在linq where 条件中遇到错误:
“位置”条件无效。实体成员正在调用无效的属性或方法
【问题讨论】:
-
您遇到了哪个错误?
-
“位置”条件无效。实体成员正在调用无效的属性或方法