2011-10-19 2 views
1

CRM 2011のSSRSでレポートを作成しようとしていますが、AppointmentSetから情報を取得しようとしています。私はすべての必要とオプションの出席者を期待することができます。私は、AppointmentSetが出席者のActivityPartySetにリンクしていることを確かめています。しかし、私は確信していません。必要な出席者とオプションの出席者を取得するにはどうしたらいいですか?これは私がこれまで持っていたものです。CRM 2011 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> 

答えて

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> 

そうでなければ、あなたがsystemuserのために全体の最終link-entityノードを省略した場合は含まれてい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> 

は、このヘルプをしていますか?

関連する問題