我有一个 FetchXML 查询,并且我有它,所以如果partitiontypemask 等于 5,它会将参与类型掩码为 5 的用户放在必填列中。但我也想添加它,所以如果用户的参与类型掩码为 6,那么它将这些用户放在可选列中。这在 FetchXML 中是否可行?这就是我到目前为止所拥有的。
<fetch>
<entity name="appointment">
<attribute name="scheduledstart" />
<link-entity name="systemuser" from="systemuserid" to="ownerid" link-type="outer">
<attribute name="firstname" alias="ownerFirstName" />
<attribute name="lastname" alias="ownerLastName" />
</link-entity>
<link-entity name="contact" from="contactid" to="new_contactperson" link-type="outer">
<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" link-type="outer">
<attribute name="participationtypemask" alias="participationtypemask" />
<filter>
<condition attribute="participationtypemask" operator="eq" value="5" />
</filter>
<link-entity name="contact" from="contactid" to="partyid" link-type="outer">
<attribute name="firstname" alias="RequiredContactFirstName" />
<attribute name="lastname" alias="RequiredContactLastName" />
</link-entity>
<link-entity name="systemuser" from="systemuserid" to="partyid" link-type="outer">
<attribute name="fullname" alias="RequiredOwners" />
</link-entity>
<link-entity name="account" from="accountid" to="partyid" link-type="outer">
<attribute name="name" alias="RequiredAccount" />
</link-entity>
</link-entity>
<filter type="and">
<condition attribute="scheduledstart" operator="on-or-after" value="@FromDate" />
<condition attribute="scheduledstart" operator="on-or-before" value="@ToDate" />
</filter>
</entity>
</fetch>