Hi ,
We require result from Phone Call entity, in two columns i.e
- Total calls completed
- Total callback requests
Question is , how could we add multiple filter conditions on two different columns.
We are able to get result for one column i.e TotalCallCompleted from Fetch XML 1 query, but unable to get Total callback request from Fetch XML 2 query.
Fetch XML 1:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true">
<entity name="activitypointer">
<filter type="and">
<condition attribute="activitytypecode" operator="eq" value="4210" />
</filter>
<link-entity name="phonecall" from="activityid" to="activityid" alias="ak">
<link-entity name="phonecall" from="activityid" to="activityid" alias="am" aggregate="true">
<attribute name="statecode" aggregate="count" alias="TotalCallcompleted"/>
<filter type="and">
<condition attribute="statuscode" operator="eq" value="2" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
but If we write below query it is not showing any results.
Fetch XML 2:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true">
<entity name="activitypointer">
<filter type="and">
<condition attribute="activitytypecode" operator="eq" value="4210" />
</filter>
<link-entity name="phonecall" from="activityid" to="activityid" alias="ak">
<link-entity name="phonecall" from="activityid" to="activityid" alias="am" aggregate="true">
<attribute name="statecode" aggregate="count" alias="TotalCallcompleted"/>
<attribute name="gts_iscallback" aggregate="count" alias="Total Callback Requests"/>
<filter type="and">
<condition attribute="statuscode" operator="eq" value="2" />
<condition attribute="gts_iscallback" value="1" operator="eq"/>
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
Regards,
Abhishek.
*This post is locked for comments
I have the same question (0)