CRM 2011 从 ActivityPartySet 获取必需和可选的联系人姓名

发布于 2024-12-10 18:13:26 字数 1240 浏览 0 评论 0原文

我正在尝试在 SSRS 中为 CRM 2011 创建报告,并尝试从 AppointmentSet 获取信息。我可以获得除必需和可选参加者之外的所有内容。我非常确定 AppointmentSet 链接到 ActivityPartySet 以供与会者使用。但我不确定。您将如何获得所需的与会者和可选的与会者。这是我到目前为止所拥有的。

<fetch>
      <entity name="appointment">
        <attribute name="scheduledstart" />
        <link-entity name="systemuser" from="systemuserid" to="ownerid">
            <attribute name="firstname" alias="ownerFirstName" />
            <attribute name="lastname" alias="ownerLastName" />
        </link-entity>
        <link-entity name="contact" from="contactid" to="new_contactperson">
            <attribute name="parentcustomerid" alias="parentaccount" />
            <attribute name="new_businessunit" alias="businessunit" />
        </link-entity>
        <attribute name="new_contactperson" />
        <attribute name="subject" />
        <attribute name="new_coldernotes" />
        <link-entity name="activityparty" from="activityid" to="activityid">
        <attribute name="participationtypemask" alias="participationtypemask" />
        </link-entity>
      </entity>
</fetch>

I am trying to create a report in SSRS for CRM 2011 and I am trying to get information from the AppointmentSet. I am able to get everything expect the Required and Optional Attendees. I'm pretty sure the AppointmentSet links to the ActivityPartySet to for the attendees. But I am not sure. How would you go about getting the required attendees and optional attendees. This is what I have so far.

<fetch>
      <entity name="appointment">
        <attribute name="scheduledstart" />
        <link-entity name="systemuser" from="systemuserid" to="ownerid">
            <attribute name="firstname" alias="ownerFirstName" />
            <attribute name="lastname" alias="ownerLastName" />
        </link-entity>
        <link-entity name="contact" from="contactid" to="new_contactperson">
            <attribute name="parentcustomerid" alias="parentaccount" />
            <attribute name="new_businessunit" alias="businessunit" />
        </link-entity>
        <attribute name="new_contactperson" />
        <attribute name="subject" />
        <attribute name="new_coldernotes" />
        <link-entity name="activityparty" from="activityid" to="activityid">
        <attribute name="participationtypemask" alias="participationtypemask" />
        </link-entity>
      </entity>
</fetch>

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

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

发布评论

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

评论(1

我是有多爱你 2024-12-17 18:13:26

我不完全清楚您的要求,但以下代码片段将返回可选或必需与会者的完整详细信息,但前提是它们是系统用户记录。如果各方包含其他记录类型,则不会返回任何结果...

<entity name='appointment'>
    <attribute name='subject'/>
    <attribute name='actualend'/>
    <attribute name='actualstart'/>
    <filter type='and'>
        <condition attribute='activityid' operator='eq' value='MyActivityGuid'/>
    </filter>
    <link-entity name='activityparty' from='activityid' to='activityid'>
        <attribute name='partyidname'/>
        <attribute name='participationtypemask'/>
        <attribute name='activityid'/>
        <attribute name='activitypartyid'/>
        <attribute name='addressused'/>         
        <attribute name='participationtypemaskname'/>
        <attribute name='partyid'/>
        <attribute name='partyiddsc'/>
        <attribute name='partyobjecttypecode'/>
        <attribute name='resourcespecid'/>
        <attribute name='resourcespeciddsc'/>
        <attribute name='resourcespecidname'/>
        <attribute name='scheduledend'/>
        <attribute name='scheduledstart'/>
        <filter type='and'/>
        <filter type='or'>
            <condition attribute='participationtypemaskname' operator='eq' value='Optional attendee'/>
            <condition attribute='participationtypemaskname' operator='eq' value='Required attendee'/>
        </filter>
        <link-entity name='systemuser' from='systemuserid' to='partyid'>
            <attribute name='fullname'/>
        </link-entity>
    </link-entity>
</entity>

否则,如果您省略 systemuser 的整个最终 link-entity 节点,您可以看到包含电子邮件地址的 addressused 属性。 IE:

<entity name='appointment'>
    <attribute name='subject'/>
    <attribute name='actualend'/>
    <attribute name='actualstart'/>
    <filter type='and'>
        <condition attribute='activityid' operator='eq' value='MyActivityGuid'/>
    </filter>
    <link-entity name='activityparty' from='activityid' to='activityid'>
        <attribute name='partyidname'/>
        <attribute name='participationtypemask'/>
        <attribute name='activityid'/>
        <attribute name='activitypartyid'/>
        <attribute name='addressused'/>         
        <attribute name='participationtypemaskname'/>
        <attribute name='partyid'/>
        <attribute name='partyiddsc'/>
        <attribute name='partyobjecttypecode'/>
        <attribute name='resourcespecid'/>
        <attribute name='resourcespeciddsc'/>
        <attribute name='resourcespecidname'/>
        <attribute name='scheduledend'/>
        <attribute name='scheduledstart'/>
        <filter type='and'/>
        <filter type='or'>
            <condition attribute='participationtypemaskname' operator='eq' value='Optional attendee'/>
            <condition attribute='participationtypemaskname' operator='eq' value='Required attendee'/>
        </filter>
    </link-entity>
</entity>

这有帮助吗?

I'm not fully clear on your requirements but the following snippet will return full details of Optional or Required attendees, but only if they are system user records. If the parties contain other record types then no results are returned...

<entity name='appointment'>
    <attribute name='subject'/>
    <attribute name='actualend'/>
    <attribute name='actualstart'/>
    <filter type='and'>
        <condition attribute='activityid' operator='eq' value='MyActivityGuid'/>
    </filter>
    <link-entity name='activityparty' from='activityid' to='activityid'>
        <attribute name='partyidname'/>
        <attribute name='participationtypemask'/>
        <attribute name='activityid'/>
        <attribute name='activitypartyid'/>
        <attribute name='addressused'/>         
        <attribute name='participationtypemaskname'/>
        <attribute name='partyid'/>
        <attribute name='partyiddsc'/>
        <attribute name='partyobjecttypecode'/>
        <attribute name='resourcespecid'/>
        <attribute name='resourcespeciddsc'/>
        <attribute name='resourcespecidname'/>
        <attribute name='scheduledend'/>
        <attribute name='scheduledstart'/>
        <filter type='and'/>
        <filter type='or'>
            <condition attribute='participationtypemaskname' operator='eq' value='Optional attendee'/>
            <condition attribute='participationtypemaskname' operator='eq' value='Required attendee'/>
        </filter>
        <link-entity name='systemuser' from='systemuserid' to='partyid'>
            <attribute name='fullname'/>
        </link-entity>
    </link-entity>
</entity>

Otherwise if you omit the entire final link-entity node for systemuser you can see the addressused attribute which contains an email address. I.e.:

<entity name='appointment'>
    <attribute name='subject'/>
    <attribute name='actualend'/>
    <attribute name='actualstart'/>
    <filter type='and'>
        <condition attribute='activityid' operator='eq' value='MyActivityGuid'/>
    </filter>
    <link-entity name='activityparty' from='activityid' to='activityid'>
        <attribute name='partyidname'/>
        <attribute name='participationtypemask'/>
        <attribute name='activityid'/>
        <attribute name='activitypartyid'/>
        <attribute name='addressused'/>         
        <attribute name='participationtypemaskname'/>
        <attribute name='partyid'/>
        <attribute name='partyiddsc'/>
        <attribute name='partyobjecttypecode'/>
        <attribute name='resourcespecid'/>
        <attribute name='resourcespeciddsc'/>
        <attribute name='resourcespecidname'/>
        <attribute name='scheduledend'/>
        <attribute name='scheduledstart'/>
        <filter type='and'/>
        <filter type='or'>
            <condition attribute='participationtypemaskname' operator='eq' value='Optional attendee'/>
            <condition attribute='participationtypemaskname' operator='eq' value='Required attendee'/>
        </filter>
    </link-entity>
</entity>

Does this help?

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