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すなわち:

<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 に答える