Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

filter subgrid

$
0
0

it filters data null data only

fetchXML is also getting data to display which in not in first grid that's my problem.

function FilterSubGrid()

 debugger; 
 var rowData = [5];
 var i;
 var gridOfPrescription = window.parent.document.getElementById('Prescriptions');
 var filteredRecordCount = Xrm.Page.getControl('diseaseGrid').getGrid().getTotalRecordCount();
 

 for(i = 0; i < filteredRecordCount ;i++ )
  { 
   var Values= Xrm.Page.getControl("diseaseGrid").getGrid().getRows().get(i).getData();
   var Entity= Values.getEntity();
   var EntityAttribute= Entity.getAttributes();
   var SelectedAttribute= EntityAttribute.get("new_disease").getValue();
   rowData[i] = SelectedAttribute; 
  }
 var fetchXmlForPrescription = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
           "  <entity name='new_prescription'>" +
           "    <attribute name='new_prescribedon' />" +
           "    <attribute name='new_patientname' />" +
           "    <attribute name='new_suggestion' />" +
           "    <attribute name='new_weightofpatient' />" +
           "    <attribute name='new_patientname' />" +
           "    <attribute name='new_prescribedbydoctor' />" +
           "    <attribute name='new_issueof' />" +
     "    <attribute name='new_disease' />" +
           "    <order attribute='new_name' descending='false' />" +
           " <link-entity name='new_patientdisease' from='new_disease' to='new_disease'>"+
     "  <filter type='and'>" +
     "   <filter type='and'>" +
              rowData+    
     "   </filter> " +
           "  </filter> " +
     " </link-entity>"+
           "  </entity>" +
           "</fetch>";
  
  gridOfPrescription.control.SetParameter("fetchXml",fetchXmlForPrescription);
        gridOfPrescription.control.refresh();
}

plz help!!!!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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