CRM 4.0 - 有没有办法知道特定营销列表中的联系人是否对营销活动做出了响应?

发布于 2024-10-20 06:41:27 字数 176 浏览 1 评论 0原文

我想知道如何对 MS CRM 4.0 执行以下操作: 我想知道某个营销活动中特定营销列表中的联系人是否尚未回复。

活动响应表单中的自定义字段是 partyfield。 CRM 不允许使用 QueryExpression 查询 PartyList 字段

有什么想法吗?

谢谢,
卡蒂亚

I am wondering how can I do the following about MS CRM 4.0:
I want to know for a campaign if a contact from a specific marketing list has not replied yet.

The field custom in the campaign response form is a partyfield. CRM doesn’t allow a PartyList field to be queried using a QueryExpression

Any ideas?

Thanks,
Katya

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无语# 2024-10-27 06:41:27

您无法直接检索活动方记录,但您可以在 LinkEntities 中使用它们:

private bool contactHasResponded(Guid idCampaign, Guid idContact)
{
    QueryExpression qryCampaignResponses = new QueryExpression("campaignresponse");
    qryCampaignResponses.ColumnSet = new AllColumns();

    qryCampaignResponses.Criteria = new FilterExpression();
    qryCampaignResponses.Criteria.AddCondition("regardingobjectid", ConditionOperator.Equal, idCampaign);

    LinkEntity leContact = new LinkEntity("campaignresponse", "activityparty", "activityid", "activityid", JoinOperator.Inner);
    leContact.LinkCriteria = new FilterExpression();
    leContact.LinkCriteria.AddCondition("partyid", ConditionOperator.Equal, idContact);

    qryCampaignResponses.LinkEntities.Add(leContact);

    List<gcCampaignresponse> lstCampaignResponses = gcCampaignresponse.RetrieveMultiple(m_svcCrm, qryCampaignResponses);

    return (lstCampaignResponses.Count > 0);
}

这将告诉您是否有针对给定活动和联系人的活动响应。 (我使用 Stunnware Tools 生成的实体类,因此 RetrieveMultiple 调用看起来有点不同,但我认为您明白我的意思)。

如果您将此 QueryExpression/LinkEntity 构造颠倒过来,您还可以获得对给定营销活动做出响应的所有联系人(您还可以通过第二个 LinkEntity 将其限制为特定营销列表中的联系人)。

唯一不可能直接使用单个查询的是您正在寻找的“否定”检查,因此您必须获取此结果并对您的营销列表进行“外部联接”以获取具有的联系人>没有回应。

You cannot retrieve activityparty records directly, but you can use them in LinkEntities:

private bool contactHasResponded(Guid idCampaign, Guid idContact)
{
    QueryExpression qryCampaignResponses = new QueryExpression("campaignresponse");
    qryCampaignResponses.ColumnSet = new AllColumns();

    qryCampaignResponses.Criteria = new FilterExpression();
    qryCampaignResponses.Criteria.AddCondition("regardingobjectid", ConditionOperator.Equal, idCampaign);

    LinkEntity leContact = new LinkEntity("campaignresponse", "activityparty", "activityid", "activityid", JoinOperator.Inner);
    leContact.LinkCriteria = new FilterExpression();
    leContact.LinkCriteria.AddCondition("partyid", ConditionOperator.Equal, idContact);

    qryCampaignResponses.LinkEntities.Add(leContact);

    List<gcCampaignresponse> lstCampaignResponses = gcCampaignresponse.RetrieveMultiple(m_svcCrm, qryCampaignResponses);

    return (lstCampaignResponses.Count > 0);
}

This will tell you whether there's a campaign response for a given campaign and contact. (I use entity classes generated by Stunnware Tools, so the RetrieveMultiple call looks a little different, but I think you get my point).

If you turn this QueryExpression/LinkEntity construct upside down, you can also get all contacts that have responded to a given campaign (you can also restrict that to contacts in a certain marketing list through a second LinkEntity).

The only thing that's not possible directly with a single query is the "negative" check you are looking for, so you'll have to take this result and do an "outer join" against your marketing list to get the contacts that have not responded.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文