Trying to figure out how to run two queries in a Fetch XML report on a Case/Incident and pass the same parameter to both queries.
The concept is that you are on the Case form, select 'Report' and run a Case Report. The Case report will have details about the specific case that you are currently viewing, but also list some details about the related activities.
Incident query:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="incident" enableprefiltering="1" ><attribute name="incidentstagecode" /><attribute name="caseorigincode" /><attribute name="title" /><attribute name="responsiblecontactid" /></entity></fetch>
That seems to work. Then I add a 2nd query to get the related activities where the regarding object id matches the current incident ID.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="activitypointer"><attribute name="subject" /><attribute name="ownerid" /><attribute name="prioritycode" /><attribute name="regardingobjectid" /><attribute name="activitytypecode" /><order attribute="createdon" descending="true" /><filter type="and"><condition attribute="activitytypecode" operator="in"><value>4202</value><value>4210</value><value>4212</value></condition><condition attribute="regardingobjectid" operator="eq" value="@CRM_incident" /></filter></entity></fetch>
This doesn't seem to work, I get errors and it won't show the report.
Thoughts? How can I get the IncidentID to both queries?