CRM 2016 最后一次电子邮件计算日期

CRM 2016 Date of Last Email Calculation

我们迫切需要 CRM 中公司记录的 'Date of Last Email' 字段。

最初我们尝试在 'Email Messages (Regarding)' 上使用汇总字段。这仅适用于在电子邮件的 'Regarding' 字段中包含公司的电子邮件。

在“活动社交”窗格中可见的许多电子邮件未设置为与该公司有关。他们被追踪到为这家公司工作的人。似乎无法在 "Date of Last Email" 类型的字段中捕获这些电子邮件。

有没有人找到捕捉这个的方法?这似乎是一个普遍的要求。

There are several approaches here:

1.Plug-in You can have a plug-in execute against the SetState message of the Email entity. When you identify that the email message was Sent, you can query the ActivityParty entity in order to identify the contacts present on the TO/CC/BCC lines, and update the Last Email Data field for those records. Note that it is not necessary to use the Regarding field here. Please, bare in mind the performance considerations here, since this message will execute basically for every email record in CRM.

2.Web Resource You can add a Web Resource to the contact form that will read the contact's email address and query the ActivityParty and Email entities in order to identify the last date and time they participated on an email activity. This Web Resource would just show this information on the form, not populating any fields in the contact form.

3.Retrieve/RetrieveMultiple plug-in Probably not the best option, but you can use the same approach here as to the Web Resource. When a contact is retrieved, you can query the ActivityParty and Email entities and populate your custom attribute within the contact entity. This will provide you with a "virtual" field containing the information you want, but may have considerable performance implications.

来源:https://community.dynamics.com/crm/f/117/t/168906