Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Need to get activities related to originating lead as wel using fetch xml

$
0
0

Hello Experts,

How to create the filter condition using fetch xml, similar to screen shot below.  Which shows all the activities related to opportunity and originating lead.

Below is the fetch xml which gave all opportunities related only to opportunity.

<fetch><entity name="opportunity" enableprefiltering="1"><attribute name="customerid" alias="customerid" /><attribute name="name" alias="name" /><attribute name="new_nextstep" alias="nextstep" /><attribute name="opportunityid" alias="opportunityid" /><attribute name="originatingleadid" alias="originatingleadid" /><link-entity name="activitypointer" from="regardingobjectid" to="opportunityid" link-type='inner' alias="activityLink"><attribute name="activitytypecode" /><attribute name="regardingobjectid" /><attribute name="subject" alias="subject" /><attribute name="statuscode" alias="statuscode" /><attribute name="statecode" alias="statecode" /><attribute name="activitytypecode" alias="activitytypecode" /><attribute name="activityid" alias="activityid" /> <attribute name="description" alias="description" /><attribute name="prioritycode" alias="prioritycode" /></link-entity></entity></fetch>

But the requirement is to show the activities related to originating lead as wel. So i tried to filter like this,

<filter type="or"><condition attribute="regardingobjectid" operator="eq" value="originatingleadid"/></filter>

within <link-entity>. This is not working. Can you anyone help me in knowing how to add filter condition so that the activities related opportunity and originating lead both will be displayed.

Thank you


Thanks and Regards. MadhuSudhan M



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>