1

我正在尝试在 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>
4

1 回答 1

0

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

<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>

否则,如果您省略整个最终link-entity节点,systemuser您可以看到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>

这有帮助吗?

于 2012-05-15T16:51:45.833 回答