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

CRM 2011 (UR13): Custom grid view for related records activities

$
0
0

Hi,

I have two entities A and B with a 1:N relationship from A to B. I have added a subgrid on entity A form to show the open activities. In this grid I would like to show the activities of entity A as well as activities of all related entity B records.

Is this possible ?

I've tried something like this but it didn't work. Please help.

var fetchXml = "<fetch version='1.0' mapping='logical' distinct='false'>" +"<entity name='activitypointer'>" +"<attribute name='subject' />" +"<attribute name='instancetypecode' /> " +"<attribute name='scheduledend' />" +"<attribute name='activitytypecode' />" +"<attribute name='scheduledstart' />" +"<attribute name='description' />" +"<attribute name='activityid' />" +"<order attribute='scheduledend' descending='false' />" +"<filter type='and'>" +"<condition attribute='isregularactivity' operator='eq' value='1' />" +"<condition attribute='statecode' operator='in'>" +"<value>0</value>" +"<value>3</value>" +"</condition>" +"<filter type='or'>" +"<condition attribute='regardingobjectid' operator='eq' uitype='entity_A' value='" + Xrm.Page.data.entity.getId() + "' />" +"<condition attribute='regardingobjectid' operator='eq' uitype='entity_B' value='{9fb43627-5d0d-e211-a38d-005056b04707}' />" +"</filter>" +"</filter>" +"</entity>" +"</fetch>";
var actGrid = document.getElementById("allopenactivities");
actGrid.control.SetParameter("fetchXml", fetchXml);
actGrid.control.refresh();



Viewing all articles
Browse latest Browse all 8223

Trending Articles



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