Here is the query we are using...I am still getting the error message. I am not a fetch xml expert. Can you help me modify the query?
ion="1.0"?>
<fetch distinct="false" version="1.0" output-format="xml-platform" mapping="logical">
<entity name="appointment">
<attribute name="subject"/>
<attribute name="statecode"/>
<attribute name="scheduledstart"/>
<attribute name="scheduledend"/>
<attribute name="createdby"/>
<attribute name="regardingobjectid"/>
<attribute name="instancetypecode"/>
<attribute name="sqm_appointmentobjective"/>
<attribute name="sqm_appointmentcategory"/>
<attribute name="activityid"/>
<attribute name="description"/>
<attribute name="createdonbehalfby"/>
<attribute name="actualstart"/>
<attribute name="actualend"/>
<order attribute="subject" descending="false"/>
<link-entity name="activityparty" from="activityid" to="activityid" link-type="inner" alias="ag">
<filter type="and">
<condition attribute="participationtypemask" operator="eq" value="5" />
</filter>
<link-entity name="appointment" from="activityid" to="activityid" link-type="inner" alias="ah" />
<attribute name ="requiredattendees" />
</link-entity>
<filter type="and">
<condition attribute="scheduledend" operator="on-or-after" value="@StartDate"/>
<condition attribute="scheduledend" operator="on-or-before" value="@EndDate"/>
<condition attribute="statecode" operator="eq" value="1"/>
<condition attribute="ownerid" operator="eq-userid"/>
</filter>
</entity>