locked
Embedded activity sub-grid on Account RRS feed

  • Question

  • Hi all

    At an Account I can use the left navigator and Activities to see all activities on the Account and also activities for related entities to this account.

    I know that if I embed a sub-grid to the account with activities I will only see activities related to the account it self in that sub-grid.

    I have search for a solution to be able to view all activities for account and it's related entities in an embedded list on the account (the same function as using the left navigator and Activities) and I think I have read something about using an iFrame but I can’t find this solution. Can someone help me with my wish?

    I don’t want to use a report in this embedded list to solve my wish. Is there another way to do this?

    /Thomas

    Wednesday, September 11, 2013 11:04 AM

All replies

  • Hi Thomas,

    You can refer to this post for the IFrame approach. http://www.dynamicscrmpros.com/2011/10/microsoft-dynamics-crm-2011-javascript-to-display-associated-views/

    You could also try if modifying the XML as described in http://blogs.msdn.com/b/crm/archive/2012/04/16/deep-queries-for-subgrids.aspx can help you get there. This would be unsupported though! I have used it go show the sub-grid of a 2nd level related entity but have not tried with activities.


    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    Wednesday, September 11, 2013 2:05 PM
  • Just change the fetxml of existing grid using following code:-
    function UpdateSubGridAppliances(){ 
    if (Xrm.Page.ui.getFormType() ==2){
        var ApplianceGrid = document.getElementById("Appliances");  
        //If this method is called from the form OnLoad, make sure that the grid is loaded before proceeding   
        //Included extra null check as a rollup 5 fix
        if (ApplianceGrid ==null || ApplianceGrid.readyState != "complete") {
            //The subgrid hasn't loaded, wait 1 second and then try again     
            setTimeout('UpdateSubGridAppliances()', 1000);     
            return; 
        } 
    var pID = Xrm.Page.getAttribute("new_propertyid").getValue()[0].id ;
        var fetchXml1= '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="new_applianceatproperty"><attribute name="new_applianceatpropertyid" /><attribute name="new_name" /><attribute name="createdon" /><attribute name="new_quantity" /><attribute name="new_productid" /><attribute name="new_location" /><attribute name="new_flloor" /><order attribute="new_name" descending="false" /><filter type="and"><condition attribute="new_propertyid" operator="eq" uitype="new_property" value="'+pID +'" /></filter></entity></fetch>';
    //  alert(fetchXml1);
       
        ApplianceGrid.control.SetParameter("fetchXml", fetchXml1); 
        //Force the subgrid to refresh 
        ApplianceGrid.control.Refresh();
    }
    }


    Regards Faisal

    Wednesday, September 11, 2013 3:41 PM