2011-10-19 7 views
1

CRM 2011 용 SSRS에서 보고서를 만들려고하고 있는데 AppointmentSet에서 정보를 얻으려고합니다. 모든 참석자가 필수 참석자와 선택 참석자를 기대할 수있게되었습니다. ActivityPartySet에 대한 AppointmentSet 링크가 참석자를위한 것으로 확신합니다. 그러나 나는 확실하지 않다. 필요한 참석자와 선택 참석자를 얻는 방법에 대해 어떻게 생각하십니까? 이것은 내가 지금까지 가지고있는 것이다.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> 

이 도움이됩니까?